3 ms·
Why would I use Angular 2 instead of React? I hope "somebody" forks Angular 1. The 2 way binding (ng-model) makes CRUD apps very simple to write, even if dige
by Roboprog 11y ago
Why would I use Angular 2 instead of React?
I hope "somebody" forks Angular 1. The 2 way binding (ng-model) makes CRUD apps very simple to write, even if digest/watch type operations are somewhat slow. As far as I can tell, the ng-model feature is OUT of Angular 2, and some kind of React style event communication must be set up instead.
I don't know React yet, but Angular 2 sounds like they are chasing the same design goals: be efficient at gluing huge mounds of similar crap to a never ending page (e.g. - a la Facebook). I am more interested in quickly grinding out code for huge CRUD forms with a large number of distinct fields.
- ZoeZoeBee 11y agoYes both are ways to deal with single page applications... 2 way data-binding is still in Angular2, as well as oneWay Binding to the input and one way binding from output. I've heard others make the claim ng-model and 2 way binding are gone, which is wrong. https://egghead.io/lessons/angular-2-using-ng-model-for-two-way-binding https://egghead.io/lessons/angular-2-using-ng-model-for-two-... There are giant performance benefits on the horizon with Angular2 in terms of server side rendering with Angular Universal and state management with ngrx/store. In Angular2 http is handled as an observable, no longer a promise, so there is a difference in syntax but that falls in line with ES7 format
- Roboprog 11y agoThanks for the update. As far as I could piece together (admittedly dubious connections), ngModel was re-implemented in the Jan 2016 release of Angular 2??? ("Angular 2.0.1 beta" from a Stack Overflow discussion assumed to mean 2.0.0-beta.1 on https://code.angularjs.org/ https://code.angularjs.org/) Sounds like somebody beat some sense into the Angular 2 team - "don't remove the single feature that differentiates your library and makes prototyping an app easy" Now if I can only find examples in good old Javascript, instead of fugly, Java-esque, Typescript. Re: types/Typescript - loved this quote: "Better type-checks interestingly found only just a few bugs" https://jaxenter.com/angularjs-interview-angular-2-typescript-and-a-release-date-123674.html https://jaxenter.com/angularjs-interview-angular-2-typescrip... Rant for another day: insisting on static typing, but ignoring the mayhem caused by operators and operator precedence (to say nothing of user created operators)
- Bahamut 11y agoTwo way binding is back in, and almost all perf benchmarks out there of Angular 2 is much faster than React. It also avoids some of the internal flaws present in current React with the coupling of the DOM layer in the library. The two way binding works by automatically updating, but also allowing you to hook into the outputs through a template convention (if bound via [(foo)], one can define a fooChange handler to hook into updates).