![]() |
VOOZH | about |
AngularJS 1.4.0.rc1 發布,此版本主要是 bug 修復,詳細列表如下:
Bug 修復$animate:
ensure that from styles are applied for class-based animations (8f819d2c)
make sure the JS animation lookup is an object lookup (103a39ca#11619)
$animateCss:ensure that rAF waiting loop doesn't ignore pending items during a flush (90e424b2)
$http:stop coercing falsy HTTP request bodies to null / empty body (e04a887c#11552#11593)
ngAnimate:
close parent animations only when there are classes to resolve (1459be17)
ensure ngClass-based classes are always resolved for CSS-enabled animations (89f081e4)
do not abort animation if onlyng-anchor-inis used (3333a5c3)
ensure that a filtered-out leave animation always runs its DOM operation (6dd64ab5#11555)
ensure that animations work when the app is bootstrapped on the document node (bee14ed1#11574)
ensure SVG classes are properly removed (fa0bbded)
ngAria:change accessibility keypress event to use event.which if it is provided (249f9b81#11340)
ngMessageFormat:
ensure bindings are valid for Protractor (992114f7#11644#11649)
minified symbol and nested required expression (8a45064f#11414#11592)
select:allow empty option to be added dynamically by ng-repeat (abf59c28#11470#11512)
$animate:provide support for animations on elements outside of $rootElement (e41faaa2)
更多內容請看發行說明,此版本現已提供下載:。
Angular JS (Angular.JS) 是一組用來開發Web頁面的框架、模板以及數據綁定和豐富UI組件。它支持整個開發進程,提供web應用的架構,無需進行手工DOM操作。 AngularJS很小,只有60K,兼容主流瀏覽器,與 jQuery 配合良好。
數據綁定可能是AngularJS最酷最實用的特性。它能夠幫助你避免書寫大量的初始代碼從而節約開發時間。一個典型的web應用可能包含了80%的代碼用來處理,查詢和監聽DOM。數據綁定使得代碼更少,你可以專注於你的應用。
傳 統來說,當model變化了。 開發人員需要手動處理DOM元素並且將屬性反映到這些變化中。這個一個雙向的過程。一方面,model變化驅動了DOM中元素變化,另一方面,DOM元素 的變化也會影響到Model。這個在用戶互動中更加複雜,因為開發人員需要處理和解析這些互動,然後融合到一個model中,並且更新View。這是一個 手動的複雜過程,當一個應用非常龐大的時候,將會是一件非常費勁的事情。
特性二:模板
在AngularJS中,一個模板就是一個HTML文件。但是HTML的內容擴展了,包含了很多幫助你映射model到view的內容。
HTML模板將會被瀏覽器解析到DOM中。DOM然後成為AngularJS編譯器的輸入。AngularJS將會遍歷DOM模板來生成一些指導,即,directive(指令)。所有的指令都負責針對view來設置數據綁定。
我 們要理解AuguarJS並不把模板當做String來操作。輸入AngularJS的是DOM而非string。數據綁定是DOM變化,不是字符串的連 接或者innerHTML變化。使用DOM作為輸入,而不是字符串,是AngularJS區別於其它的框架的最大原因。使用DOM允許你擴展指令詞彙並且 可以創建你自己的指令,甚至開發可重用的組件。
特性三:MVC
針對客戶端應用開發 AngularJS吸收了傳統的MVC基本原則。MVC或者Model-View-Controll設計模式針對不同的人可能意味不同的東西。 AngularJS並不執行傳統意義上的MVC,更接近於MVVM(Model-View-ViewModel)。
特性四:依賴注入(Dependency Injection,即DI)
AngularJS擁有內建的依賴注入子系統,可以幫助開發人員更容易的開發,理解和測試應用。
DI允許你請求你的依賴,而不是自己找尋它們。比如,我們需要一個東西,DI負責找創建並且提供給我們。
特性五:Directives(指令)
指令是我個人最喜歡的特性。你是不是也希望瀏覽器可以做點兒有意思的事情?那麼AngularJS可以做到。