Ng model help



I’m learning the basic of ionic with a tutorial and on the data-binding chapter, there is this code:

<div class="card">
    <h4>Hi {{name}}</h4>
    <input ng-model="name" type="text" placeholder="Write your name">

I tried with the tabs project bt when I do ionic serve, I can write some text but the text after Hi is never updated.

I work with ionic 3.18.0

Anyone know why?


I’ve done other few test but I don’t find why it doesn’t work.
Any idea?


In your html file

	<ion-input id="myInput" [(ngModel)]="name" type="text" placeholder="I'm the input placeholder text."></ion-input>

In your ts file

public name: string = "";

<ion-input type="text" #box (keyup)="0"></ion-input>