primeng p-dropdown not firing change event

The primeng dropdown supports an event onChange that can be looked for any change in the drop down

app.component.html

<p-dropdown [options]="cities2" [(ngModel)]="selectedCity2" optionLabel="name" (onChange)="onChange($event)"></p-dropdown>

app.component.ts

onChange(event) {
    console.log('event :' + event);
    console.log(event.value);
}

This should help

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)