What if I want to disable a button based on a condition inside the side menu? The condition needed to check will be available only after I login to the application. In the app.component.ts I’m defining my pages like
this.pages = [
{
title: "a",
component: aPage,
src: "..",
}, ......, {}
]
And in my app.html I’m using ngFor inside a button to loop through the pages to display like
<ion-menu [content]="content side="right persistent="true" (ionOpen)="openMenu()">
<ion-header>
......
</ion-header>
<ion-content>
<ion-list>
<button
id="{{p.title}}
menuClose
ion-item
*ngFor="let p of pages"
(click)="openPage(p)"
><span>{{p.title}}</span></button>
</ion-list>
</ion-content>
</ion-menu>
I want to disable a button based on a condition hot to do that ?
1 post - 1 participant