3 ms·
For me, the two way data binding and ng-model are the best parts of Angular. What do you do instead?
by gkoberger 12y ago
For me, the two way data binding and ng-model are the best parts of Angular. What do you do instead?
- yesimahuman 12y agoRight now, it's event driven: input triggers an event, event is handled in component, component state is updated. For the one-way case (that I think is pretty awesome): a zone is set up in the component to detect changes locally in the component (even changes in setTimeout) and update the components template only. I think there's room for a 2-way like wrapper for the common input use-case (ala ngModel). Still digging in though. (way more info on change detection in v2: http://victorsavkin.com/post/110170125256/change-detection-in-angular-2 http://victorsavkin.com/post/110170125256/change-detection-i...)