Drop Down Menu

Example

HTML

<ion-content padding>    
    <drop-down-menu [itemNames]="dropDownItemNames" (valueChange)="onValueChange($event)"></drop-down-menu>
    <br />
    {{dropDownValue}}
</ion-content>

TypeScript

export class DemoPage{
 
    private dropDownItemNames = ['aaa', 'bbb', 'ccc'];
    private dropDownValue: string = '';
 
    constructor() {
        this.dropDownValue = this.dropDownItemNames[0];
    }
 
    //Function to call when the dropdown value changes.
    onValueChange(data){
        this.dropDownValue = data.value;
    }   
}