Reputation: 208
<input type='text' #heroInput><p>{{heroInput.value}}</p>
Here the heroInput.value is not getting me the value inside text.
Upvotes: 0
Views: 120
Reputation: 6311
try this
<input type='text' #heroInput (keyup)="0"><p>{{heroInput.value}}</p>
Upvotes: 1
Reputation: 4208
Using ngModel is the way to go here:
<input type="text" [(ngModel)]="heroInput"><p>{{heroInput}}</p>
Upvotes: 1