AngularJS 1.5.0-rc.0 发布下载,更新如下:
特性
- $parse: provide a mechanism to access the locals object,
$locals(0ea53503) - $resource: add proper support for cancelling requests,
$cancelRequest()(98528be3,#9332, #13050, #13058, #13210) - ngAnimate: provide ng-[event]-prepare class for structural animations (6e18b50a)
- ngLocale: add support for standalone months (96c73a06,#3744, #10247, #12642, #12844)
- ngMock: destroy $rootScope after each test (b75c0d8d,#13433)
- ngTransclude: don't overwrite the contents with an unfilled optional slot (0812af49,#13426)
- ngView: reference resolved locals in scope,
resolveAs: '$resolve'(983b0598,#13400)
Bug 修复
-
$compile:
-
swap keys and values for transclude definition object (c3a26911,#13439)
-
include non-elements in default transclusion slot (df6fade6)
-
support merging special attribute names in
replacedirectives (a5ff651a,#13317, #13318) -
$http: throw if url passed is not a string (6628b4f1,#12925, #13444)
-
$parse:
-
prevent assignment on constructor properties (5a674f3b,#13417)
-
handle interceptors with
undefinedexpressions (4473b81c) -
formatNumber: cope with large and small number corner cases (6a0686d4,#13394, #8674, #12709, #8705, #12707, #10246, #10252)
-
input: add missing chars to URL validation regex (e4bb8387,#13379, #13460)
-
ngAnimate:
-
consider options.delay value for closing timeout (7ffb2d3c,#13355, #13363)
-
ensure animate runner is the same with and without animations (546a277d,#13205, #13347)
-
ignore children without animation data when closing them (77419cf1,#11992, #13424)
-
do not alter the provided options data (193153c3,#13040, #13175)
-
ngMock: clear out
$providerInjectorafter each test (a72c12bd,#13397, #13416) -
ngOptions: don't $dirty multiple select after compilation (c7a2028a,#13211, #13326)
-
ngTransclude:
重大更新
-
$compile: due to c3a26911,
This is only a breaking change to a feature that was added in beta 2. If you have not started using multi-slot transclusion then this will not affect you.
The keys and values for the transclude map of the directive definition have been swapped around to be more consistent with the other maps, such as scope and bindToController.
Now the key is the slot name and the value is a normalized element selector.
-
$resource: due to 98528be3,
Using a promise as timeout is no longer supported and will log a warning. It never worked the way it was supposed to anyway.
Before:
var deferred = $q.defer();var User = $resource('/api/user/:id', {id: '@id'}, {
get: {method: 'GET', timeout: deferred.promise}
});var user = User.get({id: 1}); // sends a requestdeferred.resolve(); // aborts the request// Now, we need to re-define `User` passing a new promise as `timeout`// or else all subsequent requests from `someAction` will be abortedUser = $resource(...);
user = User.get({id: 2});
After:
var User = $resource('/api/user/:id', {id: '@id'}, {
get: {method: 'GET', cancellable: true}
});var user = User.get({id: 1}); // sends a requestuser.$cancelRequest(); // aborts the requestuser = User.get({id: 2});
-
$sanitize: due to 7a668cdd,
The $sanitize service will now remove instances of the <use> tag from the content passed to it.
This element is used to import external SVG resources, which is a security risk as the $sanitizeservice does not have access to the resource in order to sanitize it.
-
ngView: due to 983b0598,
A new property to access route resolves is now available on the scope of the route. The default name for this property is $resolve. If your scope already contains a property with this name then it will be hidden or overwritten.
In this case, you should choose a custom name for this property, that does not collide with other properties on the scope, by specifying the resolveAs property on the route.
-
$parse: due to 0ea53503,
A new property to access all the locals for an expression is now available on the scope. This property is $locals.
-
If
scope.$localsalready exists, the way to reference this property is nowthis.$locals. -
If the locals themselves include a property
$localsthen the way to reference that is now$locals.$locals.
更多内容请看:CHANGELOG.md
下载页面:1.5.0-rc.0
一些AngularJS相关文章链接:
AngularJS权威教程 清晰PDF版 http://www.linuxidc.com/Linux/2015-01/111429.htm
希望你喜欢,并分享我的工作~带你走近AngularJS系列:
- 带你走近AngularJS - 基本功能介绍 http://www.linuxidc.com/Linux/2014-05/102140.htm
- 带你走近AngularJS - 体验指令实例 http://www.linuxidc.com/Linux/2014-05/102141.htm
- 带你走近AngularJS - 创建自定义指令 http://www.linuxidc.com/Linux/2014-05/102142.htm
如何在 AngularJS 中对控制器进行单元测试 http://www.linuxidc.com/Linux/2013-12/94166.htm
在 AngularJS 应用中通过 JSON 文件来设置状态 http://www.linuxidc.com/Linux/2014-07/104083.htm
AngularJS 之 Factory vs Service vs Provider http://www.linuxidc.com/Linux/2014-05/101475.htm
AngularJS —— 使用 ngResource、RESTful APIs 和 Spring MVC 框架提交数据 http://www.linuxidc.com/Linux/2014-07/104402.htm
AngularJS 的详细介绍:请点这里
AngularJS 的下载地址:请点这里
本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-12/126045.htm
