设为首页收藏本站

LUPA开源社区

 找回密码
 注册
文章 帖子 博客
LUPA开源社区 首页 业界资讯 软件追踪 查看内容

AngularJS 1.5.0-rc.0发布,HTML的Web框架

2015-12-10 22:51| 发布者: joejoe0332| 查看: 526| 评论: 0|原作者: oschina|来自: oschina

摘要: 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,#1 ...

AngularJS 1.5.0-rc.0 发布,更新如下:

特性

Bug 修复

重大更新

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.

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});

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.

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.

A new property to access all the locals for an expression is now available on the scope. This property is  $locals.

  • If scope.$locals already exists, the way to reference this property is now this.$locals.

  • If the locals themselves include a property $locals then the way to reference that is now$locals.$locals.

更多内容请看:CHANGELOG.md

下载页面:1.5.0-rc.0


酷毙

雷人

鲜花

鸡蛋

漂亮
  • 快毕业了,没工作经验,
    找份工作好难啊?
    赶紧去人才芯片公司磨练吧!!

最新评论

关于LUPA|人才芯片工程|人才招聘|LUPA认证|LUPA教育|LUPA开源社区 ( 浙B2-20090187 浙公网安备 33010602006705号   

返回顶部