angularjs-数据同步时机ng-model-options

前端之家收集整理的这篇文章主要介绍了angularjs-数据同步时机ng-model-options前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
#ng-model-options数据同步时机
<!DOCTYPEhtml>
<html>
<head>
<Metacharset="utf-8"/>
<title></title>
<scriptsrc="js/angular.min.js"></script>
</head>
<body>
<divng-app="app"ng-controller="ctrl">
#光标移开或者延时3s后更新
<inputtype="text"ng-model="status"ng-model-options="{updateOn:'defaultblur',debounce:{default:3000,blur:0}}"/>
{{status}}
</div>

<scripttype="text/javascript">
varm=angular.module('app',[]);
m.controller('ctrl',['$scope',function($scope){
$scope.status=true
$scope.odata=['xmzhang','cxiong','fjwu','cxiong']
}]);

</script>
</body>
</html>
原文链接:https://www.f2er.com/angularjs/146470.html

猜你在找的Angularjs相关文章