3 ms·
The main mistake, in my opinion, that Angular 2.0 is making is removing two-way data binding. The whole cornerstone of my love for Angular was the idea that whe
by andrewstuart2 12y ago
The main mistake, in my opinion, that Angular 2.0 is making is removing two-way data binding. The whole cornerstone of my love for Angular was the idea that wherever data was updated (view, model, server, another user's browser, etc.) it was trivial to make that update appear everywhere else. This is even more powerful when you add in a technology like WebRTC data channels or websockets.
I could just bind the data to the view, and if the user changed it, I could react accordingly. Data changing became an actual event that I could subscribe to. It abstracted away the onkeydown, onkeyup, onclick, etc. so that it just became ng-change. So much less mental noise when I'm developing when all I have to do is react to data having changed.
I hope this gets picked up. ES6 and TypeScript have so much to offer, but without a data-centric paradigm, I find I'm just not interested anymore.
- sanderjd 12y agoI had the same "wow" moment with two-way binding awhile back. Now I think that the important part is having a source of record that consumers can observe for changes, and a good way to update that source of record. Two-way binding is just one way to give you that. In my experience it's far more common to read data than write it, so making it more explicit where writes are happening is not burdensome and seems more maintainable and performant.
- dmarg 12y agoI think that the Angular team has not decided on two-way data binding yet. They maybe keeping it and I just asked this question on the reddit ama that they are going to do over at the /r/ngconf subreddit.
- nvivo 12y ago> The main mistake, in my opinion, that Angular 2.0 is making is removing two-way data binding They talked about it in the ng-conf available on youtube. They are not removing 2-way databinding from Angular, they are just changing the way it works.