如果我是管理员,如何在菜单中设置项目。
this.pages = [
{ title: '*', component: *, icon: '*' },
{ title: '*', component: *, icon: '*' },
{ title: 'admin', component: *, icon: '*' }
];
在此显示:
<button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
<ion-icon [name]="p.icon" style="margin-right: 10px; corlor: black;"></ion-icon>
{{p.title}}
</button>
如果admin
等于isAdmin
,我想显示true
项目