Angular 2 supports unidirectional data flow, one way at a time. How does two way data binding [(ngModel)] works in Angular2 ?
相关问题
- Angular RxJS mergeMap types
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- How to update placeholder text in ng2-smart-table?
- How to instantiate Http service in main.ts manuall
- Angular: ngc or tsc?
相关文章
- angular脚手架在ie9+下兼容问题
- angular 前端项目 build 报错 "Cannot find module 'le
- Angular Material Stepper causes mat-formfield to v
- After upgrade to Angular 9 cannot find variable in
- is there any difference between import { Observabl
- Suppress “Circular dependency detected” suppress w
- How can you get current positional information abo
- Angular material table not showing data
Angular2 comprehends
[(ngModel)] = myName
as aproperty + event
binding and as a collapsed version of,[ngModel] = 'myName'
, and(ngModelChange) = 'updateMyNameValue(myName)'
Their
unidirectional data flow
policy might as well as take the expanded version of it such as setting the scope variable explicitly by theinputs
event when the value is changed and vice-versa, so as this syntactic sugar version of it might look almost likeAccording to the docs,