16
เชิงมุมและ debounce
ใน AngularJS ฉันสามารถลบล้างโมเดลโดยใช้ตัวเลือก ng-model ng-model-options="{ debounce: 1000 }" ฉันจะลบล้างโมเดลใน Angular ได้อย่างไร ฉันพยายามค้นหา debounce ในเอกสาร แต่ไม่พบอะไรเลย https://angular.io/search/#stq=debounce&stp=1 ทางออกคือการเขียนฟังก์ชั่น debounce ของตัวเองเช่น: import {Component, Template, bootstrap} from 'angular2/angular2'; // Annotation section @Component({ selector: 'my-app' }) @Template({ url: 'app.html' }) // Component controller class MyAppComponent { constructor() { this.firstName = 'Name'; } changed($event, el){ …
160
javascript
angular