Skip to content Skip to sidebar Skip to footer

Angular 2.0 Migration Path

I am preparing a talk about 'Be ready for Angular 2.0 today' and I intend to talk about application structure changes needed in order to make the migration path easier (I know, Ang

Solution 1:

To make it the most Angular 1 way, the simplest would be to use template driven forms in Angular 2 ng-model (see here), and compare that with a ng-model Angular 1 form. Apart from some template syntax changes, they should look very similar. check here for a running example.

If you prefer not to use the form builder API, ng-model can be used without it as it only synchronizes the model with the view and vice-versa. This would be the Angular 2 version for the input:

<input [(ng-model)]="value" (keyup)="event()">

Post a Comment for "Angular 2.0 Migration Path"