javascript - How to update view? (angular2) -


i have input

<input type="text" [ngmodel]="name" (ngmodelchange)="name=$event"> 

and this.name = 'adam';

when new name backend , this.name = res.data, input value on page doesn't change. why?

try one.

<input type="text" [(ngmodel)]="name"> 

if not working check class definition.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -