angular 2.0 forms

angular 2.0 forms

ID:40356828

大?。?55.92 KB

頁數(shù):17頁

時間:2019-07-31

angular 2.0 forms_第1頁
angular 2.0 forms_第2頁
angular 2.0 forms_第3頁
angular 2.0 forms_第4頁
angular 2.0 forms_第5頁
資源描述:

《angular 2.0 forms》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在學術(shù)論文-天天文庫

1、Angular2.0:FormsThis?document?is?published?to?the?web?as?part?of?the?public?Angular?Design?Docs?folderObjectiveAngular?1.x?uses?twoway?data?bindings?to?get?data?from?the?DOM.?This?can?create?cycles?in?the?change?detection?graph,?which?results?in?the?following?proble

2、ms:●It?is?difficult?to?reason?about?the?data?flow?in?the?application?and?understand?which?components?can?affect?which?values.●The?framework?has?to?run?digest?multiple?times,?which?is?not?performant.●Because?of?multiple?digests,?it?is?impossible?to?determine?and?noti

3、fy?the?component?that?the?model?is?stable.?This?is?because?notification?can?further?change?data,?which?can?restart?the?binding?process.●The?framework?cannot?set?all?the?bindings?on?a?parent?element?before?processing?its?children,?which?makes?implementing?certain?pat

4、terns?very?difficult.●The?framework?is?harder?to?learn.?The?developer?has?to?think?about?the?digest?cycle.?●Since?the?order?of?updates?is?not?well?defined,?troubleshooting?certain?types?of?problems?is?challenging.Instead?of?a?generic?mechanism?for?twoway?data?bindin

5、gs,?Angular?2?can?have?a?more?constrained?API?for?getting?data?from?the?DOM?as?a?remedy?for?these?issues.ProposedDesign●FormControl,?FormControlGroup,?FormControlArray?are?three?basic?primitives?for?constructing?forms.?●FormBuilder?provides?a?DSL?making?form?declara

6、tion?more?concise.?FormBuilder?creates?FormControl,?FormControlGroup,?FormControlArray.?●Forms?can?be?declared?in?the?template?of?a?component.?This?creates?FormControl,?FormControlGroup,?FormControlArray.Even?though?most?developers?will?use?FormBuilder?or?will?decla

7、re?their?forms?in?the?template,?most?examples?in?the?document?use?FormControl,?FormControlGroup,?FormControlArray?directly.?This?is?to?make?the?examples?more?explicit.SimpleFormsclassSomeComponent{constructor(){<

8、inputcontrol='password'type="password">this.loginForm=newFormControlGroup("form",[newFormControl("login"),newFormControl("password"

當前文檔最多預(yù)覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當前文檔最多預(yù)覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學公式或PPT動畫的文件,查看預(yù)覽時可能會顯示錯亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負責整理代發(fā)布。如果您對本文檔版權(quán)有爭議請及時聯(lián)系客服。
3. 下載前請仔細閱讀文檔內(nèi)容,確認文檔內(nèi)容符合您的需求后進行下載,若出現(xiàn)內(nèi)容與標題不符可向本站投訴處理。
4. 下載文檔時可能由于網(wǎng)絡(luò)波動等原因無法下載或下載錯誤,付費完成后未能成功下載的用戶請聯(lián)系客服處理。