ionic-context-menu
v5.0.0
Published
A set of Angular-Components for context menus in Ionic V5 Apps.
Downloads
49
Maintainers
Readme
ionic-context-menu
A set of Angular-Components for context menus in Ionic V4 Apps.
Installation
- Install package from npm:
npm install --save ionic-context-menu
- Include
IonicContextMenuModule
into your application:
import { NgModule } from '@angular/core';
//...
import { IonicContextMenuModule } from 'ionic-context-menu';
@NgModule({
// ...
imports: [
IonicContextMenuModule
],
// ...
})
export class HomePageModule {}
Example
<ion-header>
<ion-toolbar>
<ion-title>
Ionic Blank
</ion-title>
<ion-buttons slot="end">
<ionic-context-menu icon="ellipsis-vertical-sharp">
<ionic-context-menu-item icon="home" (click)="action(1)">Item A</ionic-context-menu-item>
<ionic-context-menu-item icon="star" (click)="action(2)">Item B</ionic-context-menu-item>
<ionic-context-menu-item icon="cube" (click)="action(3)">Item C</ionic-context-menu-item>
<ionic-context-menu-item icon="beer" (click)="action(4)">Item D</ionic-context-menu-item>
</ionic-context-menu>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content padding>
</ion-content>