i create this directive for find when the value of input was changed to somthing .
import { Directive, HostListener } from '@angular/core';
@Directive({
selector: '[ktCloseDatePciker]'
})
export class CloseDatePcikerDirective {
constructor() { }
@HostListener('change', ['$event'])
click(event) {
console.log('clicked!');
}
}
and use that in the html by this :
<input #dateDirectivePicker="dpDayPicker" ktCloseDatePciker (change)="close()" formControlName="Publish_CalendarDate" id="date-lrt" theme="dp-material" matInput mode="daytime" [dpDayPicker]="datePickerConfigStart" />
but it not worked , when i change the value it can not write console in driective.
whats the problem ? how can solve this problem ?