2017-04-24 95 views

回答

3

你可以这样做,如下所示。

加工Plunk is here

.TS

product:any= {}; 
    constructor(public navController: NavController) { 

    this.product.content='123'; 

    } 

注:不要使用any。始终使用typeTS。我在这里只展示了简单的演示。

的.html

<ion-input type="text" [(ngModel)]="product.content" name="content" 
    required></ion-input>