What Is New in AngularJS 1.3
AngularJS 1.3 is a significant release focused on stability, performance, and new APIs for complex applications. It drops support for older browsers and introduces several long-requested features.
| Category | Key Changes |
|---|---|
| New Features | One-time binding, ngMessages, ngModelOptions, ES5 getter/setter support. |
| Performance & Core | Faster digest cycles, lazy one-time binding, $templateRequest service. |
| Directives & Forms | ngClick debouncing, input validation enhancements, ngFocus/ngBlur. |
| Breaking Changes | IE8 support removed, track by $index changes, ngIf/ngRepeat precedence. |
| Deprecations | Some ngMobile directives, $http's `success`/`error` methods. |
What are the major new features in 1.3?
One-time binding ({{::expr}}) is a standout addition. It creates a binding that deregisters after the expression stabilizes, reducing watcher count for a faster digest cycle. This matters because watcher overhead is a common scaling bottleneck in large AngularJS apps.
The ngMessages and ngMessage modules provide a clean way to handle form validation messages. You can now show multiple error messages and swap them out based on the specific validation state, which is much cleaner than the old conditional markup approach.
ngModelOptions gives you fine-grained control over how ngModel updates. You can debounce input, update on specific events, and control the update timing for individual fields. In practice, this eliminates the need for custom debouncing logic for instant search boxes.
How does 1.3 improve performance and the core?
The digest loop is faster. Changes to how $watch works internally and optimizations for one-time bindings mean fewer checks per cycle. For apps with thousands of bindings, the difference is noticeable.
Native ES5 getter/setter support is now the default for $scope objects. This allows AngularJS to work better with modern object observation patterns and some third-party libraries, moving away from its older custom method.
The new $templateRequest service and $templateCache improvements standardize and secure template loading. It provides a single point for downloading and caching templates with trusted resource checks.
What changed for forms and input directives?
Input validation got smarter. The required directive now works with dynamic values, and new attributes like ngMinlength/ngMaxlength were added. The form's $error object is more consistent.
Event directives like ngClick now have a built-in debouncing option to prevent accidental double-clicks. This is configured via ngModelOptions for input events or the ngClick directive itself.
New directives ngFocus and ngBlur were added, filling a gap. They behave like other event directives, evaluating an expression when the element gains or loses focus.
What breaking changes require immediate attention?
Support for Internet Explorer 8 is completely removed. The codebase now uses ES5 features directly. If you need IE8, you must stay on AngularJS 1.2.
The syntax track by $index in ngRepeat now creates a different identity for items. This can break animations that relied on the old behavior. You'll need to review animations in lists.
The order of directive compilation between ngIf and ngRepeat changed. ngIf now has higher priority. This can affect nested directives that depended on the previous compilation order.
FAQ
Should I upgrade to AngularJS 1.3 for the performance gains?
Yes, if you have a large, data-heavy application. The one-time binding feature alone can drastically reduce the number of active watchers. The faster digest cycles are a free performance boost. Test thoroughly for the breaking changes first.
How do one-time bindings work with asynchronous data?
They work well. The binding waits until the expression's value is defined (not undefined) and then stops watching. If your data arrives via $http, the binding will render once the promise resolves and the data is available. It's ideal for data that loads once and doesn't change.
What exactly does ngModelOptions do?
It lets you control the synchronization between the view and the model. For example, you can set ng-model-options="{ debounce: 300 }" to update the model 300ms after the user stops typing. You can also update on blur (updateOn: 'blur'), which is great for validation-heavy fields.
Why was IE8 support dropped?
To allow the core code to use modern JavaScript features and improve performance for everyone else. Maintaining IE8 support required workarounds that slowed down the framework and increased complexity. The web had largely moved on by 2014.
Are the $http promise methods (success/error) gone?
Not yet, but they are deprecated in 1.3. You should start using the standard promise methods then and catch. The deprecated methods will be removed in a future major release. The standard promise API is more flexible and chainable.