在app.component.ts中,我添加了菜单项的所有页面,当主页打开时我想从侧面菜单栏隐藏主菜单项,所有页面都相同。我试图使用类名来隐藏,但它会影响所有菜单项css。请给我解决方案:
constructor(public platform: Platform, public statusBar: StatusBar, public splashScreen: SplashScreen) {
this.initializeApp();
this.pages = [
{ title: 'Home', component: HomePage, icon:'home' },
{ title: 'Order History', component: OrderHistory, icon:'timer' },
{ title: 'Profile', component: Profile, icon:'person' }
];
}
openPage(page) {
console.log("open Menu");
// Reset the content nav to have just this page
// we wouldn't want the back button to show in this scenario
this.nav.setRoot(page.component);
}