Using traditional JSF AJAX with AngularJS

As a rule of thumb, don't use traditional JSF AJAX requests with AngularFaces. It's possible, but you're likely to run into all kinds of problems. In particular, expect memory leaks on the client side. This is because AngularJS assumes to control the HTML page itself. It doesn't expect third parties to modify the HTML page. But that's exactly what JSF AJAX requests do.

That said, here's how to do it: