Yesterday, I've published what I hope to be the last release candidate of AngularFaces on Maven Central. Basically, AngularFaces 2.1 RC5 already is the final version. I only called it a release candidate I did a few last-minute changes. I felt the need to run more tests.
AngularFaces 2.1 offers many new features. Today, I'll present four of them: the new license, AngularJS 1.3, first-class divs
and the new AJAX support contributed by Marco Rinck.
Apache License V2
By public request, I chose to publish AngularFaces under a more liberal license. Starting with AngularFaces 2.1, I put AngularFaces under an Apache License V2. Putting it in a nutshell, the new license allows you to use AngularFaces in commercial projects.
AngularJS 1.3
I've updated AngularJS to version 1.3. The update wasn't exactly easy: as it turned out, I used quite a few implementation details and internal APIs that have changed. I had to rewrite a couple of components from scratch (i.e. <pui-label />
and <pui-message />
).
By the way, I don't expect incompatibilities when you update from AngularFaces 2.0 to 2.1, with the sole exception of AngularJS 1.3.
Divs are now first-class citizens
Most AngularJS programs put the ng-app
and ng-controller
attributes on a div. In standard JSF, this is not possible: a div
isn't part of the JSF component tree, so AngularFaces 2.0 didn't see the AngularJS controller. AngularFaces 2.1 fixes this. div
and span
now are first-class citizens of JSF, provided they contain an ng-*
attribute.
AJAX support
I've integrated Marco Rinck's JUA project into AngularFaces. In other words: the model and scope of AngularJS now "survive" an AJAX request. JUA itself doesn't update the model, so you have to add an AngularFaces tag to update the model values after an AJAX request: <ac:updateModelAfterAJAXRequest />
.