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 in a[href] (e7730297)

    • Directives:

      • ngRepeat: support repeating over ngInclude and other directives that replace repeated nodes (9efa46ae, #3104)
      • event directives: add ngCopy, ngCut, and ngPaste (147c6929, #4172)
    • Misc:

      • jQuery 1.10.x support (e0c134b8, #3764)
      • minErr: linkify error messages on minErr docs pages (6aaae062)
      • tutorial: add step 12 on animations to the phonecat tutorial (ad525645)

    ๐Ÿ› 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:
      • deprecate promise unwrapping and make it an opt-in (5dc35b52, #4158, #4270)
      • disallow access to window and dom in expressions (be0b4856)
    • $httpBackend:
    • $location:
    • ๐ŸŒฒ $log: prevent logging undefined for $log in IE (4ff1a650, #1705)
    • Scope:

      • $evalAsync executes on the right scope (10cc1a42)
      • make stopPropagation only stop its own event (47f7bd70, #4204)
    • 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:

      • ignore class methods on comment elements (64fd2c42)
      • use get/setAttribute so that jqLite works on SVG nodes (c785267e, #3858)
    • Misc:

      • isArrayLike: correctly handle string primitives (5b8c7884, #3356)
      • protect calls to hasOwnProperty in public API (7a586e5c, #3331)
    • ngRoute:

      • ngView: IE8 regression due to expando on non-element nodes (255e8c13, #3971)
      • $route: parametrized routes do not match against locations that would not valorize each parameters. (0ff86c32)
    • ngResource:

    • ngSanitize:

      • sanitize DOCTYPE declarations correctly (e66c23fe, #3931)
      • sanitizer should not accept <!--> as a valid comment (21e9e8cf)
    • 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.
    • 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 or ngForm 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 and y parameters inside of an object and place that as the third parameter for the browserTrigger function.