标签:
Refer: http://toddmotto.com/super-fast-angular-ng-model-options-limit-digest-cycles/
Use:
<input type="text" ng-model="test" ng-model-options="{ ‘updateOn‘: ‘default blur‘, ‘debounce‘: { ‘default‘: 250, ‘blur‘: 0 } }">
With Angular Formly:
Refer: http://angular-formly.com/#/example/field-options/model-options
Use:
{ key: ‘text‘, type: ‘input‘, modelOptions: { debounce: { default: 2000, blur: 0 }, updateOn: ‘default blur‘ }, templateOptions: { label: ‘Debounce‘, placeholder: ‘update on blur and default‘ } },
[AngularJS] Use ng-model-options to limit $digest
标签:
原文地址:http://www.cnblogs.com/Answer1215/p/4965890.html