import {Component, Input, OnInit} from '@angular/core'; import {PopoverController} from '@ionic/angular'; @Component({ selector: 'common-option-menu', templateUrl: './option-menu.component.html', styleUrls: ['./option-menu.component.scss'], }) export class OptionMenuComponent implements OnInit { @Input() menuItems: Array<{name: string, icon: string, value: string, type?: string}> = []; constructor( protected popover: PopoverController, ) { } ngOnInit() {} async onSelect(value) { await this.popover.dismiss(value); } }