angularjs如何使用数据同步时机ng-model-options
这篇文章将为大家详细讲解有关angularjs如何使用数据同步时机ng-model-options,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。
#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”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。