Directive event not being received by the component
问题 I have a user search feature with a debounce directive on the search term field: <mat-form-field> <input matInput [(ngModel)]="searchTerm" (appOnDebounce)="search($event)" placeholder="Search..." autocomplete="off"> </mat-form-field> It is supposed to call the method: search(searchTerm: string): void { console.log('Searching for ' + searchTerm); } The directive is implemented as: @Directive({ selector: '[ngModel][appOnDebounce]' }) export class DebounceDirective implements OnInit, OnDestroy {