Implement sub-tree sharing; read-only pages
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<ion-list>
|
||||
<ion-item *ngFor="let menuItem of menuItems; let i = index" button (click)="onSelect(menuItems[i].value)">
|
||||
<ion-icon slot="start" [name]="menuItems[i].icon"></ion-icon>
|
||||
<ion-label>{{ menuItems[i].name }}</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
22
src/app/components/option-menu/option-menu.component.ts
Normal file
22
src/app/components/option-menu/option-menu.component.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user