|
| 1 | + |
| 2 | +<a name="1.6.0-rc.1"></a> |
| 3 | +# 1.6.0-rc.1 proximity-warning (2016-11-21) |
| 4 | + |
| 5 | +## New Features |
| 6 | + |
| 7 | +- **ngModelOptions:** allow options to be inherited from ancestor `ngModelOptions` ([296cfc](https://github.com/angular/angular.js/commit/296cfce40c25e9438bfa46a0eb27240707a10ffa) [#10922](https://github.com/angular/angular.js/issues/10922)) |
| 8 | +- **$compile:** set `preAssignBindingsEnabled` to false by default ([bcd0d4](https://github.com/angular/angular.js/commit/bcd0d4d896d0dfdd988ff4f849c1d40366125858) [#15352](https://github.com/angular/angular.js/issues/15352)) |
| 9 | + |
| 10 | +## Bug Fixes |
| 11 | + |
| 12 | +- **ngModelOptions:** handle debounce of `updateOn` triggers that are not in debounce list ([789790](https://github.com/angular/angular.js/commit/789790feee4d6c5b1f5d5b18ecb0ccf6edd36fb3)) |
| 13 | +- **ngMock/$controller:** respect `$compileProvider.preAssignBindingsEnabled()` ([7d9a79](https://github.com/angular/angular.js/commit/7d9a791c6a8c80d29d6c84afa287c81f2a307439)) |
| 14 | +- **$location:** throw if the path starts with double (back)slashes ([4aa953](https://github.com/angular/angular.js/commit/4aa9534b0fea732d6492a2863c3ee7e077c8d004)) |
| 15 | +- **core:** do not auto-bootstrap when loaded from an extension. ([0ff10e](https://github.com/angular/angular.js/commit/0ff10e1b56c6b7c4ac465e35c96a5886e294bac5)) |
| 16 | +- **input[radio]:** use strict comparison when evaluating checked-ness ([5ac7da](https://github.com/angular/angular.js/commit/5ac7daea72ec31cf337d1d21b13f0d17ff33994f) [#15288](https://github.com/angular/angular.js/issues/15288)) |
| 17 | +- **docsApp:** show correct version number in api index ([433c87](https://github.com/angular/angular.js/commit/433c8714f3d065a9a842502579b65d0388dd47ec)) |
| 18 | + |
| 19 | +## Reverts |
| 20 | + |
| 21 | +- **ngModelOptions:** allow options to be inherited from ancestor ngModelOptions ([fb0225](https://github.com/angular/angular.js/commit/fb0225a36afb08ab14a808a2fd2d2f39c13fce32)) |
| 22 | + |
| 23 | + |
| 24 | +## Performance Improvements |
| 25 | +- **ngOptions:** avoid calls to `element.value` ([3b7f29](https://github.com/angular/angular.js/commit/3b7f29ff63e8bf02327a1430dcc2a4c83915a206)) |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +## Breaking Changes |
| 30 | + |
| 31 | +- **feat($compile): set preAssignBindingsEnabled to false by default ([bcd0d4](https://github.com/angular/angular.js/commit/bcd0d4d896d0dfdd988ff4f849c1d40366125858))**: |
| 32 | + |
| 33 | +Previously, `$compileProvider.preAssignBindingsEnabled` was |
| 34 | +set to true by default. This means bindings were pre-assigned in component |
| 35 | +constructors. In Angular 1.5+ the place to put the initialization logic |
| 36 | +relying on bindings being present is the controller `$onInit` method. |
| 37 | + |
| 38 | +To migrate follow the example below: |
| 39 | + |
| 40 | +Before: |
| 41 | + |
| 42 | +```js |
| 43 | +angular.module('myApp', []) |
| 44 | + .component('myComponent', { |
| 45 | + bindings: {value: '<'}, |
| 46 | + controller: function() { |
| 47 | + this.doubleValue = this.value * 2; |
| 48 | + } |
| 49 | + }); |
| 50 | +``` |
| 51 | + |
| 52 | +After: |
| 53 | + |
| 54 | +```js |
| 55 | +angular.module('myApp', []) |
| 56 | + .component('myComponent', { |
| 57 | + bindings: {value: '<'}, |
| 58 | + controller: function() { |
| 59 | + this.$onInit = function() { |
| 60 | + this.doubleValue = this.value * 2; |
| 61 | + }; |
| 62 | + } |
| 63 | + }); |
| 64 | +``` |
| 65 | + |
| 66 | +If you don't have time to migrate the code at the moment, you can flip the |
| 67 | +setting back to true: |
| 68 | +```js |
| 69 | +angular.module('myApp', []) |
| 70 | + .config(function($compileProvider) { |
| 71 | + $compileProvider.preAssignBindingsEnabled(true); |
| 72 | + }) |
| 73 | + .component('myComponent', { |
| 74 | + bindings: {value: '<'}, |
| 75 | + controller: function() { |
| 76 | + this.doubleValue = this.value * 2; |
| 77 | + } |
| 78 | + }); |
| 79 | +``` |
| 80 | +Don't do this if you're writing a library, though, as you shouldn't change |
| 81 | +global configuration then. |
| 82 | + |
| 83 | + |
| 84 | +- **fix(input[radio]): use strict comparison when evaluating checked-ness ([5ac7da](https://github.com/angular/angular.js/commit/5ac7daea72ec31cf337d1d21b13f0d17ff33994f))**: |
| 85 | + |
| 86 | +When using input[radio], the checked status is now determined by doing |
| 87 | +a strict comparison between the value of the input and the ngModel.$viewValue. |
| 88 | +Previously, this was a non-strict comparison (==). |
| 89 | + |
| 90 | +This means in the following examples the radio is no longer checked: |
| 91 | + |
| 92 | +``` |
| 93 | + <!-- this.selected = 0 --> |
| 94 | + <input type="radio" ng-model="$ctrl.selected" value="0" > |
| 95 | + |
| 96 | + <!-- this.selected = 0; this.value = false; --> |
| 97 | + <input type="radio" ng-model="$ctrl.selected" ng-value="$ctrl.value" > |
| 98 | +``` |
| 99 | + |
| 100 | +The migration strategy is to convert values that matched with non-strict |
| 101 | +conversion so that they will match with strict conversion. |
| 102 | + |
| 103 | + |
| 104 | +- **feat(ngModelOptions): allow options to be inherited from ancestor `ngModelOptions` ([296cfc](https://github.com/angular/angular.js/commit/296cfce40c25e9438bfa46a0eb27240707a10ffa))**: |
| 105 | + |
| 106 | +The programmatic API for `ngModelOptions` has changed. You must now read options |
| 107 | +via the `ngModelController.$options.getOption(name)` method, rather than accessing the |
| 108 | +option directly as a property of the `ngModelContoller.$options` object. This does not |
| 109 | +affect the usage in templates and only affects custom directives that might have been |
| 110 | +reading options for their own purposes. |
| 111 | + |
| 112 | +One benefit of these changes, though, is that the `ngModelControler.$options` property |
| 113 | +is now guaranteed to be defined so there is no need to check before accessing. |
| 114 | + |
| 115 | +So, previously: |
| 116 | + |
| 117 | +``` |
| 118 | +var myOption = ngModelController.$options && ngModelController.$options['my-option']; |
| 119 | +``` |
| 120 | + |
| 121 | +and now: |
| 122 | + |
| 123 | +``` |
| 124 | +var myOption = ngModelController.$options.getOption('my-option'); |
| 125 | +``` |
| 126 | + |
| 127 | + |
1 | 128 | <a name="1.6.0-rc.0"></a>
|
2 | 129 | # 1.6.0-rc.0 bracing-vortex (2016-10-26)
|
3 | 130 |
|
|
0 commit comments