标签:angularjs
#ng-model-options数据同步时机 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> <script src="js/angular.min.js"></script> </head> <body> <div ng-app="app" ng-controller="ctrl"> #光标移开或者延时3s后更新 <input type="text" ng-model="status" ng-model-options="{updateOn:‘default blur‘,debounce:{default:3000,blur:0}}"/> {{status}} </div> <script type="text/javascript"> var m=angular.module(‘app‘,[]); m.controller(‘ctrl‘,[‘$scope‘,function($scope){ $scope.status=true $scope.odata=[‘xmzhang‘,‘cxiong‘,‘fjwu‘,‘cxiong‘] }]); </script> </body> </html>
angularjs-数据同步时机ng-model-options
标签:angularjs
原文地址:http://f1yinsky.blog.51cto.com/12568071/1956255