My angular application stuck with a issue, i used input as array and pushed a value to the array when the click event arise. But the ngOnChanges not firing when the array push is done. Is there a way to fire ngOnChange
My Code is ts file is
@Component({
selector: 'adv-search',
templateUrl: './app/modules/result.html'
})
export class InputComponent {
@Input() metas:any=[];
ngOnChanges() {
console.log(this.metas);
}
}
My Selector Tag
<adv-search [metas] = "metaIds"></adv-search>
Click Event Code
insertIds(id:any) {
metaIds.push(id);
}
insterIds
event ? – Hinayana