亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

angularJs中ng-model-options設(shè)置數(shù)據(jù)同步的方法

 更新時間:2018年09月30日 14:29:13   作者:泠泠在路上  
今天小編就為大家分享一篇angularJs中ng-model-options設(shè)置數(shù)據(jù)同步的方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧

后臺請求任務(wù)量很大的時候,可以設(shè)置同步的時間和操作,

利用ng-model-options來實現(xiàn),提高網(wǎng)站性能。

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <script src="angular.min.js"></script>
</head>
<body>
<div ng-app="module" ng-controller="ctrl">
<!--updateOn:blur,鼠標(biāo)離開時同步更新scope數(shù)據(jù)-->
<!--debounce:5000,數(shù)據(jù)輸入完成后5秒,同步更新scope數(shù)據(jù)-->
  <input type="text" ng-model="title" ng-model-options="{updateOn:'default blur',debounce:{default:2000,blur:0}}">
  <!--ng-model-options="{updateOn:'default blur',debounce:{default:2000,blur:0}}
  輸入光標(biāo)離開,立即更新,若不離開,2秒后更新
-->
  {{title}}
</div>
<script>
  var m = angular.module('module', []);
  m.controller('ctrl', ['$scope', function ($scope) {
  }]);
</script>
</body>
</html>

以上這篇angularJs中ng-model-options設(shè)置數(shù)據(jù)同步的方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論