angular中ng-model绑定数组数据

使用angular绑定数组数据时,controller中定义的值类型要与html中写的一样,ng-model="{{number}}"为数字类型,ng-model="'{{number}}'"为字符串类型,如果controller中的的类型为$scope.number = 1;这时就不能加单引号

猜你喜欢

转载自notebookdong.iteye.com/blog/2281557