我想在用户登录后更改我的侧边菜单,以便显示名称及其侧边菜单。我认为这段代码是可以理解的。
rootPage: any = SlidesPage;
if( SlidesPage){
this.pages = [
{ title: 'Welcome', component: SlidesPage },
{ title: 'Home', component: HomePage },
{ title: 'House & Lot', component: HousePage },
{ title: 'Condominium', component: CondoPage },
{ title: 'Apartment', component: ApartmentPage },
{ title: 'Hotel', component: HotelPage }
];
} else {
this.pages = [
{ title: 'Dashboard', component: SellerPage },
{ title: 'My Properties', component: SellerPage },
{ title: 'Properties', component: HomePage },
{ title: 'House & Lot', component: HousePage },
{ title: 'Condominium', component: CondoPage },
{ title: 'Apartment', component: ApartmentPage },
{ title: 'Hotel', component: HotelPage }
];
}