The waiting is over, it's already here. Maybe it doesn't resolve all the concerns (yes, concerns, I wouldn't even call them issues), but 1.3 is a major update that was supposed to prove that Angular.js is evolving & community's voice is being taken under consideration.

What's new?

If you want full list of changes, you have to check here. Below you can find the list of what was important for me personally:

  1. One-time bindings: finally a response to all of those who:
    • were questioning the performance of digest loop in large applications
    • evangalized simplicity of simple templated rendering ver 2-way binding (like in React)
  2. ngModelOptions: additional exposed model manipulation options, aimed to simplify stuff like debouncing or specification of event type that causes validation
  3. ngMessages: dedicated directives to simplify form validation
  4. performance optimizations: these are always welcome
  5. Since now, IE8 support is discountinued - whether it's good or bad - I'll leave it to you

Does it really matter?

IMHO one-time bindings is something people (including myself) were realling waiting for. Especially the ones who in the meantime have got some experience with Twitter Flight or React.js. Introducing ngModelOptions is welcome as well - so far developers were forced to implements such details (like debouncing) on their own, for instance by using a wrapper function like this in underscore.js debounce function call:

    this.safeApply = function(scope, fn) {
        var phase = scope.$$phase;
        if(phase == '$apply' || phase == '$digest') {
            if(fn && (typeof(fn) === 'function')) {
                fn();
            }
        } else {
            scope.$apply(fn);
        }
    };

But the other improvements aren't that meaningful at all. I was expecting some more support for event-driven application design, but it seems that Google (authors of AngularJS) is quite strictly bound to the original idea for this library. Well, maybe it's good, at least it's coherent.

What about upgrading from 1.2.x?

Anyone who remembers previous major version migration cases can confirm that breaking changes WERE happening & sometimes they were really painful.

This time it wasn't that bad - there are still some breaking changes, but again there's a quite clean guide that will assist you with applying these.

One point I've found particularily interesting: if you are constructing your DSL with directives that were replaced with some generated code ("replace" param in "$compile") - you're in trouble because this is deprecated (didn't disappear yet though).

I'm still working on fixing my stuff (2 red tests remaining ...), but honestly I did it all wrong, because in the mean-time I've upgraded Chrome (which I use for Selenium) without running a full test suite afterwards & now it's not always perfectly clear whether different behavior is caused by new Chrome or new AngularJS (yes, I'm too lazy to revert to pre-mig version to re-exec the suite ...).

For instance: ngModel cooperation with dates seem to be changed a bit. It may be due to Google working on their implementation of input#type: time & date, but more likely there's something wrong with the binding code.

The summary

AngularJS 1.3 didn't rock my world. It seems like a step in a right direction, but cautious, conservative, staid and dignified. We want more.

Share this post