发布于 2015-11-18 01:31:45 | 226 次阅读 | 评论: 0 | 来源: 网友投递
这里有新鲜出炉的AngularJS Tutorial中文版,程序狗速度看过来!
AngularJS 前端JS框架
AngularJS诞生于Google是一款优秀的前端JS框架,已经被用于Google的多款产品当中。AngularJS有着诸多特性,最为核心的是:MVC、模块化、自动化双向数据绑定、语义化标签、依赖注入,等等。
Angular.js v1.5.0 beta.2 发布,更新内容如下:
$animate: ensure leave animation calls close
callback (bfad2a4f,#12278, #12096, #13054)
$cacheFactory: check key exists before decreasing cache size count (b9bed7d9,#12321, #12329)
$compile:
bind all directive controllers correctly when using bindToController
(bd7b2177,#11343, #11345)
evaluate against the correct scope with bindToController on new scope (50557a6c,#13021, #13025)
bind all directive controllers correctly when using bindToController
(1c13a4f4,#11343, #11345)
fix scoping of transclusion directives inside replace directive (1a98c0ee,#12975, #12936, #13244)
use createMap() for $$observe listeners when initialized from attr interpolation (76c2491a,#10446)
properly sanitize xlink:href attribute interoplation (f33ce173,#12524)
$http: apply transformResponse
even when data
is empty (7c0731ed,#12976, #12979)
$location: ensure $locationChangeSuccess
fires even if URL ends with #
(4412fe23,#12175, #13251)
$parse:
$resource: allow XHR request to be cancelled via timeout promise (4fc73466,#12657, #12675, #10890, #9332)
$rootScope: stop IE9 memory leak when destroying scopes (8fe781fb,#10706, #11786)
$sanitize:
Angular.js: fix isArrayLike
for unusual cases (2c8d87e0,#10186, #8000, #4855, #4751, #10272)
filters: ensure formatNumber
observes i18n decimal separators (658a865c,#10342, #12850)
injector: support arrow functions with no parenthesis (03726f7f,#12890)
input: remove workaround for Firefox bug (b366f035)
isArrayLike: handle jQuery objects of length 0 (773efd08)
jqLite:
limitTo: start at 0 if begin
is negative and exceeds input length (ecf93048,#12775, #12781)
merge:
ngAnimate:
ngAria: don't add tabindex to radio and checkbox inputs (662fb282,#12492, #13095)
ngInput: change URL_REGEXP to better match RFC3987 (ffb6b2fb,#11341, #11381)
ngMessage: make ngMessage compatible with ngBind (4971ef12,#8089, #13074)
ngMessages: prevent race condition with ngAnimate (8366622b,#12856, #12903)
ngOptions:
skip comments and empty options when looking for options (395f3ec6,#12190, #13029, #13033)
override select option registration (2fcfd75a,#11685, #12972, #12968, #13012)
skip comments when looking for option elements (7f3f3dd3,#12190)
allow falsy values as option group identifiers (b71d7c3f,#7015, #7024, #12888)
ngResource: encode &
in URL query param values (1c97a605,#12201)
orderByFilter: throw error if input is not array-like (2a85a634,#11255, #11719)
$animateCss: add support for temporary styles via cleanupStyles
(9f67da62,#12930)
$compile: multiple transclusion via named slots (a4ada8ba,#4357, #12742, #11736, #12934)
$http: add $xhrFactory
service to enable creation of custom xhr objects (106f90aa,#2318, #9319, #12159)
$injector:
$templateRequest: support configuration of $http options (b2fc39d2,#13188, #11868, #6860)
Module: add helper method, component(...)
for creating component directives (54e81655,#10007, #12933)
linky: add support for custom attributes (06f002b1,#12558, #13061)
ngAnimate: introduce ngAnimateSwap directive (78297d25)
ngMock:
ngModel: provide ng-empty and ng-not-empty CSS classes (630280c7,#10050, #12848)
$compile:
$interpolate: provide a simplified result for constant expressions (cf83b4f4)
copy:
merge: remove unnecessary wrapping of jqLite element (4daafd3d,#13236)
$sanitize: due to 181fc567, The svg support in is now an opt-in option
Applications that depend on this option can use to turn the option back on, but while doing so, please read the warning provided in the documentation for information on preventing click-hijacking attacks when this option is turned on.
ngMessage: due to 4971ef12,
ngMessage is now compiled with a priority of 1, which means directives on the same element as ngMessage with a priority lower than 1 will be applied when ngMessage calls the $transclude function. Previously, they were applied during the initial compile phase and were passed the comment element created by the transclusion of ngMessage. To restore this behavior, custom directives need to have their priority increased to at least "1".
ngOptions: due to ded25187,
ngOptions
will now throw if ngModel
is not present on the select
element. Previously, having no ngModel
let ngOptions
silently fail, which could lead to hard to debug errors. The change should therefore not affect any applications, as it simply makes the requirement more strict and alerts the developer explicitly.
orderByFilter: due to 2a85a634,
Previously, an non array-like input would pass through the orderBy filter unchanged. Now, an error is thrown. This can be worked around by converting an object to an array, either manually or using a filter such ashttps://github.com/petebacondarwin/angular-toArrayFilter. (null
and undefined
still pass through without an error, in order to support asynchronous loading of resources.)
Closes #11255 Closes #11719
详情请看:CHANGELOG.md
下载地址:v1.5.0-beta.2
AngularJS诞生于Google是一款优秀的前端JS框架,已经被用于Google的多款产品当中。AngularJS有着诸多特性,最为核心的是:MVC、模块化、自动化双向数据绑定、语义化标签、依赖注入,等等。