angular.js v1.2.0-rc.3 Release Notes
Release Date: 2013-10-14 // over 10 years ago-
๐ Features
- $interval: add a service wrapping setInterval (2b5ce84f)
- $sce: simpler patterns for
$sceDelegateProviders
white/blacklists (93ce5923, #4006) - $filter: allow map of filters to be registered (4033cf28, #4036, #4091)
$compile: support
tel:
links ina[href]
(e7730297)Directives:
Misc:
๐ Bug Fixes
- $compile:
- abort compilation when duplicate element transclusion (63c5334c, #3893, #4217, #3307)
- make order directives w/ same priority deterministic (4357da85)
- fix (reverse) directive postLink fn execution order (31f190d4, #3558)
- don't terminate compilation for regular transclusion directives (fe214501)
- ng-attr to support dash separated attribute names (8e6e3eba)
- allow interpolations for non-event handlers attrs (8e1276c0)
- link parents before traversing (742271ff, #3792, #3923, #3935, #3927)
- collect ranges on multiple directives on one element (6a8edc1d, #4002)
- ๐ $parse:
- $httpBackend:
- $location:
- ๐ฒ $log: prevent logging
undefined
for $log in IE (4ff1a650, #1705) Scope:
Filters:
- date: allow negative millisecond value strings (025c9219)
Directives:
- correct priority of structural directives (ngRepeat, ngSwitchWhen, ngIf, ngInclude, ngView) (b7af76b4)
- input:
false
is no longer an empty value by default (b56b21a8, #3490) - ngBindHtml: watch string value instead of wrapper (e2068ad4, #3932)
- ngOptions: ignore object properties which start with $ (aa3c54c7)
- ngRepeat: correctly track elements even when the collection is initially undefined (31c56f54, #4145, #3964)
- ngTransclude: detect ngTransclude usage without a transclusion directive (5a1a6b86, #3759)
jqLite:
Misc:
ngRoute:
ngResource:
ngSanitize:
ngTouch:
ngAnimate:
- ensure that a timeStamp is created if not provided by the browser event (cd216c4c, #3053)
- perform internal caching on getComputedStyle to boost the performance of CSS3 transitions/animations (b1e604e3, #4011, #4124)
- ensure structural animations skip all child animations even if no animation is present during compile (cc584607, #3215)
- cancel any ongoing child animations during move and leave animations (3f31a7c7)
- ensure elapsedTime always considers delay values (079dd939)
- ensure transition-property is not changed when only keyframe animations are in use (2df3c9f5, #3933)
- avoid completing the animation asynchronously unless CSS transitions/animations are present (2a63dfa6, #4023, #3940)
- ensure that delays are always considered before an animation closes (0a63adce, #4028)
- check elapsedTime on current event (d50ed6bf)
- support addClass/removeClass animations on SVG nodes (c785267e, #3858)
ngScenario:
๐ฅ Breaking Changes
- $compile: due to 31f190d4, the order of postLink fn is now mirror opposite of the order in which corresponding preLinking and compile functions execute.
Previously the compile/link fns executed in this order controlled via priority:
- CompilePriorityHigh, CompilePriorityMedium, CompilePriorityLow
- compile child nodes
- PreLinkPriorityHigh, PreLinkPriorityMedium, PreLinkPriorityLow
- link child nodes
- PostLinkPriorityHigh, PostLinkPriorityMedium, PostLinkPriorityLow
This was changed to:
- CompilePriorityHigh, CompilePriorityMedium, CompilePriorityLow
- compile child nodes
- PreLinkPriorityHigh, PreLinkPriorityMedium, PreLinkPriorityLow
- link child nodes
- PostLinkPriorityLow, PostLinkPriorityMedium , PostLinkPriorityHigh
Very few directives in practice rely on order of postLinking function (unlike on the order of compile functions), so in the rare case of this change affecting an existing directive, it might be necessary to convert it to a preLinking function or give it negative priority (look at the diff of this commit to see how an internal attribute interpolation directive was adjusted).
๐ $parse:
- due to 5dc35b52,
$parse and templates in general will no longer automatically unwrap promises. This feature has been deprecated and if absolutely needed, it can be reenabled during transitional period via
$parseProvider.unwrapPromises(true)
api. - due to b6a37d11, feature added in rc.2 that unwraps return values from functions if the values are promises (if promise unwrapping is enabled - see previous point), was reverted due to breaking a popular usage pattern.
- due to 5dc35b52,
$parse and templates in general will no longer automatically unwrap promises. This feature has been deprecated and if absolutely needed, it can be reenabled during transitional period via
directives: due to b7af76b4, the priority of ngRepeat, ngSwitchWhen, ngIf, ngInclude and ngView has changed. This could affect directives that explicitly specify their priority.
In order to make ngRepeat, ngSwitchWhen, ngIf, ngInclude and ngView work together in all common scenarios their directives are being adjusted to achieve the following precedence:
Directive | Old Priority | New Priority ============================================= ngRepeat | 1000 | 1000 --------------------------------------------- ngSwitchWhen | 500 | 800 --------------------------------------------- ngIf | 1000 | 600 --------------------------------------------- ngInclude/ngView | 1000 | 400
- form/ngForm due to 7a586e5c, Inputs with name equal to "hasOwnProperty" are not allowed inside form or ngForm directives.
Before, inputs whose name was "hasOwnProperty" were quietly ignored and not added to the scope. Now a badname exception is thrown.
Using "hasOwnProperty" for an input name would be very unusual and bad practice.
Either do not include such an input in a
form
orngForm
directive or change the name of the input.- ngScenario: due to 28f56a38,
browserTrigger now uses an eventData object instead of direct parameters for mouse events.
To migrate, place the
keys
,x
andy
parameters inside of an object and place that as the third parameter for the browserTrigger function.