angular ng-bind

 <body ng-app="">

 <div ng-controller="firstController">
<input type="text" ng-model="name" value=""/>
<input type="text" ng-model="age" value=""/>
<div ng-bind="name"></div>
<div ng-bind="age"></div>
<script>
var firstController = function($scope){
//scope叫做作用于
$scope.name = "张三";
$scope.age = "20";
}
</script>
</div>
</body>
上一篇:wpf中通过ObjectDataProvider实现文本框的双向数据绑定(ps:适用于在文本框比较多的时候使用)


下一篇:关于 tp5.0 阿里云 oss 上传文件操作