- Forums
- Angular
- How To Use Ngmodel In Angular 2
this page contains an example of how you can use ngModel in angular 2 [4640], Last Updated: Mon Jun 24, 2024
Angular2
Tue Jan 31, 2017
0 Comments
400 Visits
[(ngModel)]="selectedHero.name"
this is an example on how you can use ngModel in angular 2, i am using typescript so this is the new way to use ngModel on es2015 style angular.
<input [(ngModel)]="StringName" />
you entered: {{StringName}}
the old way was:
data-ng-model="answerCheck[0]"