`) will now throw
+the "nodomevents" error at compile time.
+Previously the nodomevents was thrown at link time. The new behavior makes it consistent with
+the "selmulti" error.
+The breaking change should be rare, as it relates to incorrect API use that should not make it to
+production apps in the first place.
+
+
+- **[04cad4](https://github.com/angular/angular.js/commit/04cad41d26ebaf44b5ee0c29a152d61f235f3efa)**:
+ secure `link[href]` as a `RESOURCE_URL` in `$sce`
+
+`link[href]` attributes are now protected via `$sce`, which prevents interpolated
+values that fail the `RESOURCE_URL` context tests from being used in interpolation.
+
+For example if the application is running at `https://docs.angularjs.org` then the
+following will fail:
+
+```
+
+```
+
+By default, `RESOURCE_URL` safe URLs are only allowed from the same domain and protocol
+as the application document.
+
+To use URLs from other domains and/or protocols, you may either whitelist them or
+wrap it into a trusted value by calling `$sce.trustAsResourceUrl(url)`.
+
+- **[97bbf8](https://github.com/angular/angular.js/commit/97bbf86a1979d099802f0d631c17c54b87563b40)**:
+ don't trim white-space in attributes
+
+White-space in attributes is no longer trimmed automatically. This includes leading and trailing
+white-space, and attributes that are purely white-space.
+
+To migrate, attributes that require trimming must now be trimmed manually.
+
+A common cases where stray white-space can cause problems is when
+attribute values are compared, for example in an $observer:
+
+Before:
+```js
+$attrs.$observe('myAttr', function(newVal) {
+ if (newVal === 'false') ...
+});
+```
+
+To migrate, the attribute value should be trimmed manually:
+```js
+$attrs.$observe('myAttr', function(newVal) {
+ if (newVal.trim() === 'false') ...
+});
+```
+
+Note that `$parse` trims expressions automatically, so attributes with expressions (e.g. directive
+bindings) are unlikely to be affected by stray white-space.
+
+
+
+### `ngRoute` due to:
+
+- **[c13c66](https://github.com/angular/angular.js/commit/c13c666728c1a1485ef18e92d7cb35118ce39609)**:
+ allow `ngView` to be included in an asynchronously loaded template
+
+In cases where `ngView` was loaded asynchronously, `$route` (and its dependencies; e.g. `$location`)
+might also have been instantiated asynchronously. After this change, `$route` (and its dependencies)
+will - by default - be instantiated early on.
+
+Although this is not expected to have unwanted side-effects in normal application bebavior, it may
+affect your unit tests: When testing a module that (directly or indirectly) depends on `ngRoute`, a
+request will be made for the default route's template. If not properly "trained", `$httpBackend`
+will complain about this unexpected request.
+
+You can restore the previous behavior (and avoid unexpected requests in tests), by using
+`$routeProvider.eagerInstantiationEnabled(false)`.
+
+- **[7f4b35](https://github.com/angular/angular.js/commit/7f4b356c2bebb87f0c26b57a20415b004b20bcd1)**:
+ don't process route change controllers and templates for `redirectTo` routes
+
+The $route service no longer instantiates controllers nor calls resolves or template functions
+for routes that have a `redirectTo` unless the `redirectTo` is a function that returns
+`undefined`.
+
+- **[e98656](https://github.com/angular/angular.js/commit/e9865654b39c71be71034c38581a8c7bd16bc716)**:
+ implement `resolveRedirectTo`
+
+Previously, if `redirectTo` was a function that threw an Error, execution was aborted without firing
+a `$routeChangeError` event.
+Now, if a `redirectTo` function throws an Error, a `$routeChangeError` event will be fired.
+
+
+
+### `ngMock` due to:
+- **[267ee9](https://github.com/angular/angular.js/commit/267ee9c892b0eb40908700ee2435793f8c6c1c84)**:
+ trigger digest in `$httpBackend.verifyNoOutstandingRequest()`
+
+Calling `$httpBackend.verifyNoOutstandingRequest()` will trigger a digest. This will ensure that
+requests fired asynchronously will also be detected (without the need to manually trigger a digest).
+This is not expected to affect the majority of test-suites. Most of the time, a digest is (directly
+or indirectly) triggered anyway, before calling `verifyNoOutstandingRequest()`.
+In the unlikely case that a test needs to verify the timing of a request with respect to the digest
+cycle, you should rely on other means, such as mocking and/or spying.
+
+- **[7551b8](https://github.com/angular/angular.js/commit/7551b8975a91ee286cc2cf4af5e78f924533575e)**:
+ fail if a url is provided but is `undefined`
+
+It is no longer valid to explicitly pass `undefined` as the `url` argument
+to any of the `$httpBackend.when...()` and `$httpBackend.expect...()`
+methods.
+
+While this argument is optional, it must have a defined value if it is
+provided.
+
+Previously passing an explicit `undefined` value was ignored but this
+lead to invalid tests passing unexpectedly.
+
+### `ngAria` due to:
+
+- **[ad41ba](https://github.com/angular/angular.js/commit/ad41baa1fdc057db3fe529ff87735b173b164b4c)**:
+ bind to `keydown` instead of `keypress` in `ngClick`
+
+If you were explicitly setting the value of the `bindKeypress` flag, you need to change your code to
+use `bindKeydown` instead.
+
+Before: `$ariaProvider.config({bindKeypress: xyz})`
+After: `$ariaProvider.config({bindKeydown: xyz})`
+
+**Note:**
+If the element already has any of the `ngKeydown`/`ngKeyup`/`ngKeypress` directives, `ngAria` will
+_not_ bind to the `keydown` event, since it assumes that the developer has already taken care of
+keyboard interaction for that element.
+
+Although it is not expected to affect many applications, it might be desirable to keep the previous
+behavior of binding to the `keypress` event instead of the `keydown`. In that case, you need to
+manually use the `ngKeypress` directive (in addition to `ngClick`).
+
+Before:
+
+```html
+
+ I respond to `click` and `keypress` (not `keydown`)
+
+```
+
+After:
+
+```html
+
+ I respond to `click` and `keypress` (not `keydown`)
+
+
+
+ I respond to `click` and `keydown` (not `keypress`)
+
+```
+
+Finally, it is possible that this change affects your unit or end-to-end tests. If you are currently
+expecting your custom buttons to automatically respond to the `keypress` event (due to `ngAria`),
+you need to change the tests to trigger `keydown` events instead.
+
+- **[9978de](https://github.com/angular/angular.js/commit/9978de11b7295fec1a2f4cb8fbeb9b62b54cb711)**:
+ don't add roles to native control elements
+
+ngAria will no longer add the "role" attribute to native control elements
+(textarea, button, select, summary, details, a, and input). Previously, "role" was not added to
+input, but all others in the list.
+
+This should not affect accessibility, because native inputs are accessible by default, but it might
+affect applications that relied on the "role" attribute being present (e.g. for styling or as
+directive attributes).
+
+
+### `$resource` due to:
+
+- **[acb545](https://github.com/angular/angular.js/commit/acb545ec3ebf099db68561033645941c900973b5)**:
+ pass all extra, owned properties as params
+
+All owned properties of the `params` object that are not used to replace URL params, will be passed
+to `$http` as `config.params` (to be used as query parameters in the URL), even if
+`Object.prototype` has a property with the same name. E.g.:
+
+Before:
+
+```js
+var Foo = $resource('/foo/:id');
+Foo.get({id: 42, bar: 'baz', toString: 'hmm'});
+ // URL: /foo/42?bar=baz
+ // Note that `toString` is _not_ included in the query,
+ // because `Object.prototype.toString` is defined :(
+```
+
+After:
+
+```js
+var Foo = $resource('/foo/:id');
+Foo.get({id: 42, bar: 'baz', toString: 'hmm'});
+ // URL: /foo/42?bar=baz&toString=hmm
+ // Note that `toString` _is_ included in the query, as expected :)
+```
+
+- **[2456ab](https://github.com/angular/angular.js/commit/2456ab63a613902d21c151445f9c697a76ab43b3)**:
+ add semicolon to whitelist of delimiters to unencode in URL params
+
+Although it shouldn't matter in practice (since both the encoded and the unencoded `;` character would
+be interpreted identically by the server), this change could break some tests: For example, where
+`$httpBackend` was set up to expect an encoded `;` character, but the request is made to the URL with an
+unencoded `;` character.
+
+
+### `select` due to:
+
+- **[f02b70](https://github.com/angular/angular.js/commit/f02b707b5e4a5ffd1e1a20d910754cfabfc19622)**:
+ support values of any type added with `ngValue`
+
+`` elements added to `` via `ngValue` now add their values in hash form, i.e.
+`` becomes ` `.
+
+This is done to support binding options with values of any type to selects.
+
+This should rarely affect applications, as the values of options are usually not relevant to the
+application logic, but it's possible that option values are checked in tests.
+
+- **[e8c2e1](https://github.com/angular/angular.js/commit/e8c2e119758e58e18fe43932d09a8ff9f506aa9d)**:
+ don't register options when select has no `ngModel`
+
+Option elements will no longer set their value attribute from their text value when their select
+element has no ngModel associated. Setting the value is only needed for the select directive to
+match model values and options. If no ngModel is present, the select directive doesn't need it.
+
+This should not affect many applications as the behavior was undocumented and not part of a public
+API. It also has no effect on the usual HTML5 behavior that sets the select value to the option text
+if the option does not provide a value attribute.
+
+### `ngBind` due to:
+
+- **[fa80a6](https://github.com/angular/angular.js/commit/fa80a61a05a3b49a2c770d5544cb8480907a18d3)**:
+ use same string representation as $interpolate
+
+`ngBind` now uses the same logic as $interpolate (i.e. {{myString}}) when
+binding, which means values other than strings are now transformed as following:
+- null / undefined become empty string
+- with an object's custom toString() function, except if the object is a Date, Array, or Number
+- otherwise with JSON.stringify
+
+Previously, ngBind would always use toString().
+
+The following examples show the different output:
+```js
+$scope.myPlainObject = {a: 1, b: 2};
+$scope.myCustomObject = {a: 1, b: 2, toString: function() {return 'a+b';}};
+```
+
+Plain Object:
+```html
+
+[object Object]
+
+
+{'a':1,'b':2}
+```
+
+Object with custom toString():
+
+```html
+
+[object Object]
+
+
+a+b
+```
+
+If you want the output of `toString()`, you can use it directly on the value in ngBind:
+
+```html
+[object Object]
+```
+
+### `$interpolate` due to:
+
+- **[a5fd2e](https://github.com/angular/angular.js/commit/a5fd2e4c0376676fa317e09a8d8be4966b82cbfe)**:
+ use custom `toString()` function if present
+
+When converting values to strings, interpolation now uses a custom toString() function on objects
+that are not Number, Array or Date (custom means that the `toString` function is not the same as
+`Object.prototype.toString`). Otherwise, interpolation uses JSON.stringify() as usual.
+
+Should you have a custom toString() function but still want the output of JSON.stringify(),
+migrate as shown in the following examples:
+
+Before:
+
+```html
+{{myObject}}
+```
+
+After - use the `json` filter to stringify the object:
+
+```html
+{{myObject | json}}
+```
+
+
+### `loader` due to:
+- **[6a2ebd](https://github.com/angular/angular.js/commit/6a2ebdba5df27e789e3cb10f11eedf90f7b9b97e)**:
+ module.decorator order of operations is now irrelevant
+
+`module.decorator` declarations are now processed as part of the `module.config`
+queue and may result in providers being decorated in a different order if
+`module.config` blocks are also used to decorate providers via
+`$provide.decorator`.
+
+For example, consider the following declaration order in which 'theFactory' is
+decorated by both a `module.decorator` and a `$provide.decorator`:
+
+```js
+angular
+ .module('theApp', [])
+ .factory('theFactory', theFactoryFn)
+ .config(function($provide) {
+ $provide.decorator('theFactory', provideDecoratorFn);
+ })
+ .decorator('theFactory', moduleDecoratorFn);
+```
+
+Prior to this fix, 'theFactory' provider would be decorated in the following
+order:
+ 1. moduleDecoratorFn
+ 2. provideDecoratorFn
+
+The result of this fix changes the order in which 'theFactory' is decorated
+because now `module.decorator` declarations are processed in the same order as
+`module.config` declarations:
+ 1. provideDecoratorFn
+ 2. moduleDecoratorFn
+
+
+
+### `$location` due to:
+- **[aa077e](https://github.com/angular/angular.js/commit/aa077e81129c740041438688dff2e8d20c3d7b52)**:
+ default hashPrefix to '!'
+
+The hash-prefix for `$location` hash-bang URLs has changed from the empty
+string "" to the bang "!". If your application does not use HTML5 mode
+or is being run on browsers that do not support HTML5 mode, and you have
+not specified your own hash-prefix then client side URLs will now contain
+a "!" prefix. For example, rather than `mydomain.com/#/a/b/c` will become
+`mydomain.com/#!/a/b/c`.
+
+If you actually wanted to have no hash-prefix then you should configure
+this by adding a configuration block to you application:
+
+```js
+appModule.config(['$locationProvider', function($locationProvider) {
+ $locationProvider.hashPrefix('');
+}]);
+```
+
+
+### `input[type=range]` due to:
+
+- **[913016](https://github.com/angular/angular.js/commit/9130166767c4792c5d32d08a918fc7becf32c9a6)**:
+ add support for binding to `input[type=range]`
+
+Due to the way that `input[type=range]` elements behave this feature modifies the behavior of such elements
+when bound to `ngModel`:
+
+- Like `input[type=number]`, it requires the model to be a Number, and will set the model to a Number
+- it supports setting the min/max values only via the min/max attributes
+- it follows the browser behavior of never allowing an invalid value. That means, when the browser
+converts an invalid value (empty: `null`, `undefined`, `false` ..., out of bounds: greater than max, less than min)
+to a valid value, the input will in turn set the model to this new valid value via `$setViewValue`.
+ - this means a range input will never be required and never have a non-Number model value, once the
+ ngModel directive is initialized.
+ - this behavior is supported when the model changes and when the min/max attributes change in a way
+ that prompts the browser to update the input value.
+- browsers that do not support `input[type=range]` (IE9) handle the input like a number input (with validation etc.)
+
+
+### `input[type=number]` due to:
+
+- **[e1da4be](https://github.com/angular/angular.js/commit/e1da4bed8e291003d485a8ad346ab80bed8ae2e3)**:
+ add support for `step` to `input[type=number]`
+
+Number inputs that use `ngModel` and specify a `step` constraint (via `step`/`ngStep` attributes)
+will now have a new validator (`step`), which will verify that the current value is valid under the
+`step` constraint (according to the [spec](https://www.w3.org/TR/html5/forms.html#the-step-attribute)).
+Previously, the `step` constraint was ignored by `ngModel`, treating values as valid even when there
+was a step-mismatch.
+
+If you want to restore the previous behavior (use the `step` attribute while disabling step
+validation), you can overwrite the built-in `step` validator with a custom directive. For example:
+
+```js
+// For all `input` elements...
+.directive('input', function() {
+ return {
+ restrict: 'E',
+ require: '?ngModel',
+ link: function (scope, elem, attrs, ngModelCtrl) {
+ // ...that are of type "number" and have `ngModel`...
+ if ((attrs.type === 'number') && ngModelCtrl) {
+ // ...remove the `step` validator.
+ delete ngModelCtrl.$validators.step;
+ }
+ }
+ };
+})
+```
+
# 1.6.0-rc.2 safety-insurance (2016-11-24)
@@ -13,7 +1385,7 @@
## Performance Improvements
-- ***:** don't trigger digests after enter/leave of structural directives
+- **all:** don't trigger digests after enter/leave of structural directives
([f4fb6e](https://github.com/angular/angular.js/commit/f4fb6e0983a6a700dc4a246a913504550b55f1e9)
[#15322](https://github.com/angular/angular.js/issues/15322))
@@ -236,7 +1608,7 @@ Please read the [Sandbox Removal Blog Post](http://angularjs.blogspot.com/2016/0
- add/remove selected attribute for selected/unselected options ([c75698](https://github.com/angular/angular.js/commit/c75698df55f5a026bcd7fcecbb9d4ff0bc3ebc3e))
- don't register options when select has no ngModel ([e8c2e1](https://github.com/angular/angular.js/commit/e8c2e119758e58e18fe43932d09a8ff9f506aa9d))
- handle model updates when options are manipulated ([47c15f](https://github.com/angular/angular.js/commit/47c15fbcc10f118170813021e8e605ffd263ad84))
- - remove workaround for Chrome bug ([87eff2](https://github.com/angular/angular.js/commit/87eff27e971414fb163e2b5a7cfe78cb097a1951))
+ - remove workaround for a Chrome bug ([87eff2](https://github.com/angular/angular.js/commit/87eff27e971414fb163e2b5a7cfe78cb097a1951))
- **select, ngOptions:** make the handling of unknown / empty options consistent ([2785ad](https://github.com/angular/angular.js/commit/2785ad72599ca5f9558a116baecd83a5bebe3292))
- **ngValue:** set the element's value property in addition to the value attribute ([e6afca](https://github.com/angular/angular.js/commit/e6afca00c9061a3e13b570796ca3ab428c1723a1) [#14031](https://github.com/angular/angular.js/issues/14031))
- **aria/ngModel:** do not overwrite the default `$isEmpty()` method for checkboxes ([975a61](https://github.com/angular/angular.js/commit/975a6170efceb2a5e6377c57329731c0636eb8c8) [#14621](https://github.com/angular/angular.js/issues/14621))
@@ -260,7 +1632,7 @@ Please read the [Sandbox Removal Blog Post](http://angularjs.blogspot.com/2016/0
## New Features
- **jqLite:**
- - implement `jqLite(f)` as alias to `jqLite(document).ready(f)` ([369fb7](https://github.com/angular/angular.js/commit/369fb7f4f73664bcdab0350701552d8bef6f605e))
+ - implement `jqLite(f)` as an alias to `jqLite(document).ready(f)` ([369fb7](https://github.com/angular/angular.js/commit/369fb7f4f73664bcdab0350701552d8bef6f605e))
- don't throw for elements with missing `getAttribute` ([4e6c14](https://github.com/angular/angular.js/commit/4e6c14dcae4a9a30b3610a288ef8d20db47c4417))
- don't remove a boolean attribute for `.attr(attrName, '')` ([3faf45](https://github.com/angular/angular.js/commit/3faf4505732758165083c9d21de71fa9b6983f4a))
- remove the attribute for `.attr(attribute, null)` ([4e3624](https://github.com/angular/angular.js/commit/4e3624552284d0e725bf6262b2e468cd2c7682fa))