发布于 2015-04-10 23:50:35 | 238 次阅读 | 评论: 0 | 来源: 网友投递
AngularJS 前端JS框架
AngularJS诞生于Google是一款优秀的前端JS框架,已经被用于Google的多款产品当中。AngularJS有着诸多特性,最为核心的是:MVC、模块化、自动化双向数据绑定、语义化标签、依赖注入,等等。
AngularJS 1.4.0.rc0 发布,代号为 smooth-unwinding。
此版本现已提供下载:
https://github.com/angular/angular.js/archive/v1.4.0-rc.0.zip
更新内容如下:
$compile:
$http: throw error if success
and error
methods do not receive a function (1af563d4,#11330, #11333)
$parse: fix parse errors on older Android WebViews which choke with reserved keywords (10ae33b2,#11455)
$rootScope: allow destroying a root scope (f8c8cf69,#11241, #10895)
cookieReader: safely access $document so it can be mocked (a057e089,#11373, #11388)
filterFilter: fix matching against null
/undefined
(b5002ab6,#11432, #11445)
ngAnimate: ensure that minified repaint code isn't removed (c55a4944,#9936)
ngAria: handle elements with role="checkbox/menuitemcheckbox" (44337f63,#11317, #11321)
ngModel: allow setting model to NaN when asyncValidator is present (948120ec,#11315, #11411)
ngTouch: register touches properly when jQuery is used (06a9f0a9,#4001, #8584, #10797, #11488)
select: don't call $render twice if $viewValue ref changes (7e5c447f,#11329, #11412)
$anchorScroll: allow scrolling to a specified element (731c8b5e,#4568, #9596)
$animate: complete refactor of internal animation code (c8700f04)
$http: support custom params serializers (6c8464ad,#3740, #7429, #9224, #11461)
$interpolate: extend interpolation with MessageFormat like syntax (1e58488a,#11152)
angular.Module: add decorator
method (e57138d7,#11305, #11300)
ngClass: add support for conditional map within an array. (4588e627,#4807)
$rootScope: remove history event handler when app is torn down (d996305b,#9897, #9905)
benchmark: add ngmodel benchmarks to largetable-bp (b8dbdb0c,#11082)
ngOptions: only perform deep equality check on ngModel if using track by (171b9f7f,#11448, #11447)
$animate: due to c8700f04, JavaSript and CSS animations can no longer be run in parallel. With earlier versions of ngAnimate, both CSS and JS animations would be run together when multiple animations were detected. This feature has now been removed, however, the same effect, with even more possibilities, can be achieved by injecting $animateCss
into a JavaScript-defined animation and creating custom CSS-based animations from there. Read the ngAnimate docs for more info.
$animate: due to c8700f04, The function params for $animate.enabled()
when an element is used are now flipped. This fix allows the function to act as a getter when a single element param is provided.
// < 1.4$animate.enabled(false, element);// 1.4+$animate.enabled(element, false);
$animate: due to c8700f04, In addition to disabling the children of the element,$animate.enabled(element, false)
will now also disable animations on the element itself.
$animate: due to c8700f04, Animation-related callbacks are now fired on$animate.on
instead of directly being on the element.
// < 1.4element.on('$animate:before', function(e, data) { if (data.event === 'enter') { ... } }); element.off('$animate:before', fn);// 1.4+$animate.on(element, 'enter', function(data) { //...}); $animate.off(element, 'enter', fn);
$animate: due to c8700f04, There is no need to call $scope.$apply
or$scope.$digest
inside of a animation promise callback anymore since the promise is resolved within a digest automatically (but a digest is not run unless the promise is chained).
// < 1.4$animate.enter(element).then(function() { $scope.$apply(function() { $scope.explode = true; }); });// 1.4+$animate.enter(element).then(function() { $scope.explode = true; });
$animate: due to c8700f04, When an enter, leave or move animation is triggered then it will always end any pending or active parent class based animations (animations triggered via ngClass) in order to ensure that any CSS styles are resolved in time.
更多内容请看更新日志。
Angular JS (Angular.JS) 是一组用来开发Web页面的框架、模板以及数据绑定和丰富UI组件。它支持整个开发进程,提供web应用的架构,无需进行手工DOM操作。 AngularJS很小,只有60K,兼容主流浏览器,与 jQuery 配合良好。
AngularJS诞生于Google是一款优秀的前端JS框架,已经被用于Google的多款产品当中。AngularJS有着诸多特性,最为核心的是:MVC、模块化、自动化双向数据绑定、语义化标签、依赖注入,等等。