|
| 1 | +<a name="1.5.0-rc.0"></a> |
| 2 | +# 1.5.0-rc.0 oblong-panoptikum (2015-12-09) |
| 3 | + |
| 4 | +This is the first Release Candidate for AngularJS 1.5.0. Please try upgrading your applications and |
| 5 | +report any regressions or other issues you find as soon as possible. |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- **$parse:** provide a mechanism to access the locals object, `$locals` |
| 10 | + ([0ea53503](https://github.com/angular/angular.js/commit/0ea535035a3a1a992948490c3533bffb83235052)) |
| 11 | + |
| 12 | +- **$resource:** add proper support for cancelling requests, `$cancelRequest()` |
| 13 | + ([98528be3](https://github.com/angular/angular.js/commit/98528be311b48269ba0e15ba4e3e2ad9b89693a9), |
| 14 | + [#9332](https://github.com/angular/angular.js/issues/9332), [#13050](https://github.com/angular/angular.js/issues/13050), [#13058](https://github.com/angular/angular.js/issues/13058), [#13210](https://github.com/angular/angular.js/issues/13210)) |
| 15 | + |
| 16 | +- **ngAnimate:** provide ng-[event]-prepare class for structural animations |
| 17 | + ([6e18b50a](https://github.com/angular/angular.js/commit/6e18b50a5b168848cc526081b0a2a16075ee44bd)) |
| 18 | + |
| 19 | +- **ngLocale:** add support for standalone months |
| 20 | + ([96c73a06](https://github.com/angular/angular.js/commit/96c73a0672f0e46ae9285c482b057bd03ce135ba), |
| 21 | + [#3744](https://github.com/angular/angular.js/issues/3744), [#10247](https://github.com/angular/angular.js/issues/10247), [#12642](https://github.com/angular/angular.js/issues/12642), [#12844](https://github.com/angular/angular.js/issues/12844)) |
| 22 | + |
| 23 | +- **ngMock:** destroy $rootScope after each test |
| 24 | + ([b75c0d8d](https://github.com/angular/angular.js/commit/b75c0d8d0549261ece551210a11d8be48c3ab3cc), |
| 25 | + [#13433](https://github.com/angular/angular.js/issues/13433)) |
| 26 | + |
| 27 | +- **ngTransclude:** don't overwrite the contents with an unfilled optional slot |
| 28 | + ([0812af49](https://github.com/angular/angular.js/commit/0812af49bd4f4fad4067603ff64dbe720bd6e3e5), |
| 29 | + [#13426](https://github.com/angular/angular.js/issues/13426)) |
| 30 | + |
| 31 | +- **ngView:** reference resolved locals in scope, `resolveAs: '$resolve'` |
| 32 | + ([983b0598](https://github.com/angular/angular.js/commit/983b0598121a8c5a3a51a30120e114d7e3085d4d), |
| 33 | + [#13400](https://github.com/angular/angular.js/issues/13400)) |
| 34 | + |
| 35 | + |
| 36 | +## Bug Fixes |
| 37 | + |
| 38 | +- **$compile:** |
| 39 | + - swap keys and values for transclude definition object |
| 40 | + ([c3a26911](https://github.com/angular/angular.js/commit/c3a2691115b92536fb3d213d0ca16ac68cf32415), |
| 41 | + [#13439](https://github.com/angular/angular.js/issues/13439)) |
| 42 | + - include non-elements in default transclusion slot |
| 43 | + ([df6fade6](https://github.com/angular/angular.js/commit/df6fade6e67cfbfb5295bab3703ba2054d48daa7)) |
| 44 | + - support merging special attribute names in `replace` directives |
| 45 | + ([a5ff651a](https://github.com/angular/angular.js/commit/a5ff651a59933c2c43b81642454ee458f98e1401), |
| 46 | + [#13317](https://github.com/angular/angular.js/issues/13317), [#13318](https://github.com/angular/angular.js/issues/13318)) |
| 47 | + |
| 48 | +- **$http:** throw if url passed is not a string |
| 49 | + ([6628b4f1](https://github.com/angular/angular.js/commit/6628b4f1e5835d997290881c6ba394547883a516), |
| 50 | + [#12925](https://github.com/angular/angular.js/issues/12925), [#13444](https://github.com/angular/angular.js/issues/13444)) |
| 51 | + |
| 52 | +- **$parse:** |
| 53 | + - prevent assignment on constructor properties |
| 54 | + ([5a674f3b](https://github.com/angular/angular.js/commit/5a674f3bb9d1118d11b333e3b966c01a571c09e6), |
| 55 | + [#13417](https://github.com/angular/angular.js/issues/13417)) |
| 56 | + - handle interceptors with `undefined` expressions |
| 57 | + ([4473b81c](https://github.com/angular/angular.js/commit/4473b81cdaf16c5509ac53d80b9bdfb0a7ac5f30)) |
| 58 | + |
| 59 | +- **$sanitize:** blacklist SVG `<use>` elements |
| 60 | + ([7a668cdd](https://github.com/angular/angular.js/commit/7a668cdd7d08a7016883eb3c671cbcd586223ae8), |
| 61 | + [#13453](https://github.com/angular/angular.js/issues/13453)) |
| 62 | + |
| 63 | +- **formatNumber:** cope with large and small number corner cases |
| 64 | + ([6a0686d4](https://github.com/angular/angular.js/commit/6a0686d434c41445c50b2d9669073802ede77b3b), |
| 65 | + [#13394](https://github.com/angular/angular.js/issues/13394), [#8674](https://github.com/angular/angular.js/issues/8674), [#12709](https://github.com/angular/angular.js/issues/12709), [#8705](https://github.com/angular/angular.js/issues/8705), [#12707](https://github.com/angular/angular.js/issues/12707), [#10246](https://github.com/angular/angular.js/issues/10246), [#10252](https://github.com/angular/angular.js/issues/10252)) |
| 66 | + |
| 67 | +- **input:** add missing chars to URL validation regex |
| 68 | + ([e4bb8387](https://github.com/angular/angular.js/commit/e4bb8387952069cca9da06bbc5c87ae576c2bf6f), |
| 69 | + [#13379](https://github.com/angular/angular.js/issues/13379), [#13460](https://github.com/angular/angular.js/issues/13460)) |
| 70 | + |
| 71 | +- **ngAnimate:** |
| 72 | + - consider options.delay value for closing timeout |
| 73 | + ([7ffb2d3c](https://github.com/angular/angular.js/commit/7ffb2d3c17643303a51eb4e324c365af70fe3824), |
| 74 | + [#13355](https://github.com/angular/angular.js/issues/13355), [#13363](https://github.com/angular/angular.js/issues/13363)) |
| 75 | + - ensure animate runner is the same with and without animations |
| 76 | + ([546a277d](https://github.com/angular/angular.js/commit/546a277d65a3e075178d9b6d7ea6abcebc4bc04b), |
| 77 | + [#13205](https://github.com/angular/angular.js/issues/13205), [#13347](https://github.com/angular/angular.js/issues/13347)) |
| 78 | + - ignore children without animation data when closing them |
| 79 | + ([77419cf1](https://github.com/angular/angular.js/commit/77419cf19fe625b262e971d5453151c63ff52b34), |
| 80 | + [#11992](https://github.com/angular/angular.js/issues/11992), [#13424](https://github.com/angular/angular.js/issues/13424)) |
| 81 | + - do not alter the provided options data |
| 82 | + ([193153c3](https://github.com/angular/angular.js/commit/193153c3d391338a859cb7788ef32a8af05fb920), |
| 83 | + [#13040](https://github.com/angular/angular.js/issues/13040), [#13175](https://github.com/angular/angular.js/issues/13175)) |
| 84 | + |
| 85 | +- **ngMock:** clear out `$providerInjector` after each test |
| 86 | + ([a72c12bd](https://github.com/angular/angular.js/commit/a72c12bd7052da9f60da74625409374342b50b73), |
| 87 | + [#13397](https://github.com/angular/angular.js/issues/13397), [#13416](https://github.com/angular/angular.js/issues/13416)) |
| 88 | + |
| 89 | +- **ngOptions:** don't $dirty multiple select after compilation |
| 90 | + ([c7a2028a](https://github.com/angular/angular.js/commit/c7a2028ab38cdfc4d956c50b6f41cbccef302165), |
| 91 | + [#13211](https://github.com/angular/angular.js/issues/13211), [#13326](https://github.com/angular/angular.js/issues/13326)) |
| 92 | + |
| 93 | +- **ngTransclude:** |
| 94 | + - don't replace existing content if no transcluded content exists |
| 95 | + ([c3ae6ed7](https://github.com/angular/angular.js/commit/c3ae6ed78e145a9b0c13de7ef95852ba3c467551), |
| 96 | + [#11839](https://github.com/angular/angular.js/issues/11839)) |
| 97 | + - fix case where ngTransclude attribute value equals its key |
| 98 | + ([7ddbc9aa](https://github.com/angular/angular.js/commit/7ddbc9aa35119154acb649e8c5096babc1d43476), |
| 99 | + [#12934](https://github.com/angular/angular.js/issues/12934), [#13383](https://github.com/angular/angular.js/issues/13383)) |
| 100 | + |
| 101 | + |
| 102 | +## Breaking Changes |
| 103 | + |
| 104 | +- **$compile:** due to [c3a26911](https://github.com/angular/angular.js/commit/c3a2691115b92536fb3d213d0ca16ac68cf32415), |
| 105 | + |
| 106 | +**This is only a breaking change to a feature that was added in beta 2. If you have not started |
| 107 | +using multi-slot transclusion then this will not affect you.** |
| 108 | + |
| 109 | +The keys and values for the `transclude` map of the directive definition have been swapped around |
| 110 | +to be more consistent with the other maps, such as `scope` and `bindToController`. |
| 111 | + |
| 112 | +Now the `key` is the slot name and the `value` is a normalized element selector. |
| 113 | + |
| 114 | + |
| 115 | +- **$resource:** due to [98528be3](https://github.com/angular/angular.js/commit/98528be311b48269ba0e15ba4e3e2ad9b89693a9), |
| 116 | + |
| 117 | +Using a promise as `timeout` is no longer supported and will log a |
| 118 | +warning. It never worked the way it was supposed to anyway. |
| 119 | + |
| 120 | +Before: |
| 121 | + |
| 122 | +```js |
| 123 | +var deferred = $q.defer(); |
| 124 | +var User = $resource('/api/user/:id', {id: '@id'}, { |
| 125 | + get: {method: 'GET', timeout: deferred.promise} |
| 126 | +}); |
| 127 | + |
| 128 | +var user = User.get({id: 1}); // sends a request |
| 129 | +deferred.resolve(); // aborts the request |
| 130 | + |
| 131 | +// Now, we need to re-define `User` passing a new promise as `timeout` |
| 132 | +// or else all subsequent requests from `someAction` will be aborted |
| 133 | +User = $resource(...); |
| 134 | +user = User.get({id: 2}); |
| 135 | +``` |
| 136 | + |
| 137 | +After: |
| 138 | + |
| 139 | +```js |
| 140 | +var User = $resource('/api/user/:id', {id: '@id'}, { |
| 141 | + get: {method: 'GET', cancellable: true} |
| 142 | +}); |
| 143 | + |
| 144 | +var user = User.get({id: 1}); // sends a request |
| 145 | +instance.$cancelRequest(); // aborts the request |
| 146 | + |
| 147 | +user = User.get({id: 2}); |
| 148 | +``` |
| 149 | + |
| 150 | +- **$sanitize:** due to [7a668cdd](https://github.com/angular/angular.js/commit/7a668cdd7d08a7016883eb3c671cbcd586223ae8), |
| 151 | + |
| 152 | +The $sanitize service will now remove instances of the `<use>` tag from the content passed to it. |
| 153 | + |
| 154 | +This element is used to import external SVG resources, which is a security risk as the `$sanitize` |
| 155 | +service does not have access to the resource in order to sanitize it. |
| 156 | + |
| 157 | +- **ngView:** due to [983b0598](https://github.com/angular/angular.js/commit/983b0598121a8c5a3a51a30120e114d7e3085d4d), |
| 158 | + |
| 159 | +A new property to access route resolves is now available on the scope of the route. The default name |
| 160 | +for this property is `$resolve`. If your scope already contains a property with this name then it |
| 161 | +will be hidden or overwritten. |
| 162 | + |
| 163 | +In this case, you should choose a custom name for this property, that does not collide with other |
| 164 | +properties on the scope, by specifying the `resolveAs` property on the route. |
| 165 | + |
| 166 | + |
| 167 | +- **$parse:** due to [0ea53503](https://github.com/angular/angular.js/commit/0ea535035a3a1a992948490c3533bffb83235052), |
| 168 | + |
| 169 | +A new property to access all the locals for an expression is now available on the scope. This property |
| 170 | +is `$locals`. |
| 171 | + |
| 172 | +* If `scope.$locals` already exists, the way to reference this property is now `this.$locals`. |
| 173 | +* If the locals themselves include a property `$locals` then the way to reference that is now `$locals.$locals`. |
| 174 | + |
| 175 | + |
1 | 176 | <a name="1.4.8"></a>
|
2 | 177 | # 1.4.8 ice-manipulation (2015-11-19)
|
3 | 178 |
|
|
0 commit comments