无法绑定到“ ngModel”,因为它不是“ input”元素的已知属性,并且没有与相应属性匹配的指令
注意:即时通讯使用alpha.31
import { Component, View, bootstrap } from 'angular2/angular2'
@Component({
selector: 'data-bind'
})
@View({
template:`
<input id="name" type="text"
[ng-model]="name"
(ng-model)="name = $event" />
{{ name }}
`
})
class DataBinding {
name: string;
constructor(){
this.name = 'Jose';
}
}
bootstrap(DataBinding);
jeck猫
慕侠2389804
相关分类