angular.js v1.5.0-rc.1 Release Notes
Release Date: 2016-01-15 // about 8 years ago-
๐ Features
- $compile:
- $compileProvider: - allow registering components with the component() method (feeb19787ca6e23e15578a4d1319f1c33853290c)
- component:
- $injector: support instantiating classes. (8b6b4282)
- ngMock: add support for
$animate.closeAndFlush()
(e1def1b8, #13005, #13576, #13707) - ngMock.$componentController: add helper to instantiate controllers for components (dd14e0c4, #13683, #13711)
๐ Bug Fixes
- $animate:
- $animateCss:
- $compile:
- component:
- $controller: allow identifiers containing
$
(4e1b36c2, #13736) - $injector: workaround for MS Edge class detection (fabc6ab5)
- $q: make instanceof work for $q promises (b3ef5e08)
- copy:
- input: fix URL validation being too strict (e3be5d6e, #13528, #13544)
- isArrayLike: recognize empty instances of an Array subclass (93c7251f, #13560, #13708)
- ๐ linky: throw error if input is not a string (98c2db7f, #13547, #13693)
- ngAnimate:
- only copy over the animation options once (d4fa3313, #13722, #13578)
- allow event listeners on document in IE (e5cab951, #13548, #13696)
- allow removing classes that are added by a running animation (776972ed, #13339, #13380, #13414, #13472, #13678)
- do not use event.timeStamp anymore for time tracking (e020b899, #13494, #13495)
- ngInclude: do not compile template if original scope is destroyed (98776487)
- ngMock: ignore empty javascript animations in $animate.closeAndFlush() (a801df71)
- ngOptions: don't skip optgroup elements with value === '' (6858caf2, #13487, #13489)
- select: re-define ngModelCtrl.$render in the select postLink fn (f7eab8d8, #13583, #13583, #13663)
๐ฅ Breaking Changes
$component: โก๏ธ These breaking changes affect only applications updating from previous 1.5 beta / rc versions
- Due to d91cf167,
0๏ธโฃ the default
controllerAs
value for components is now$ctrl
(previously the name of the component was used). To migrate, either setcontrollerAs
to the component name, or change the property name in your templates to$ctrl
- Due to 25bc5318, it is no longer possible to
set the
restrict
option on directives created via themodule.component()
helper. All components are now element directives (restrict: 'E'
). If you need a directive that is not an element then you must use themodule.directive()
helper instead. - Due to f31c5a39,
components are now always created with
scope: {}
(isolate scope). Previously, it was also possible to create components ๐ง withscope: true
orscope: false
. If your components rely on this scope configuration, you will have to create a regular directive instead. - Due to 6a47c0d7,
0๏ธโฃ the
transclude
property is nowfalse
by default (previouslytrue
). If you created components that expected transclusion then you must change your code to specifytransclude: true
.
- Due to d91cf167,
0๏ธโฃ the default
๐ linky: due to 98c2db7f,
Before this change, the filter assumed that the input (if not undefined/null) was of type 'string' and that certain methods (such as
.match()
) would be available on it. Passing a non-string value would most likely result in a not-very-useful error being thrown (trying to call a method that does not exist) or in unexpected behavior (if the input happened to have the assumed methods).After this change, a proper (informative) error will be thrown. If you want to pass non-string values through
linky
, you need to explicitly convert them to strings first. Since input values could be initialized asynchronously,undefined
ornull
will still be returned unchanged (without throwing an error).