File

src/app/manage-learn/shared/components/popover/popover.component.ts

Metadata

Index

Methods
Inputs

Inputs

menus
Type : any

Methods

onEvent
onEvent(menu)
Parameters :
Name Optional
menu No
Returns : void
import { Component, Input } from '@angular/core';
import { popoverController } from '@ionic/core';
@Component({
  selector: 'app-popover',
  templateUrl: './popover.component.html',
  styleUrls: ['./popover.component.scss'],
})
export class PopoverComponent {
  @Input() menus;
  
  onEvent(menu) {
    popoverController.dismiss(menu.VALUE);
  }
}
<ion-list>
  <ion-item *ngFor="let menu of menus" (click)="onEvent(menu)">
    <ion-label class="menu-label">{{menu.TITLE | translate}}
    </ion-label>
    <ion-avatar slot="end" class="avatar-style" *ngIf="menu.ICON">
      <ion-icon [name]="menu.ICON"></ion-icon>
    </ion-avatar>
  </ion-item>
</ion-list>

./popover.component.scss

.menu-label{
    font-size: 1rem;
}
.avatar-style{
    display: contents;
    font-size: 1.75rem;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""