private router: Router,
// 不显示底部的页面数组
hideFooterPage: Array<any> = [
'/spot/trade',
'/contract/trade',
'/bxa'
];
// 不显示头部的页面数组
hideHeaderPage: Array<any> = [
'/bxa'
];
/**
* 是否隐藏 底部 or 头部
*/
hideFooterHeader() {
const isHideFooter = this.hideFooterPage.some(item => {
return this.router.url.indexOf(item) === 0;
});
const isHideHeader = this.hideHeaderPage.some(item => {
return this.router.url.indexOf(item) === 0;
});
this.isHideFooter = isHideFooter;
this.isHideHeader = isHideHeader;
}
angular6 根据路由判断是否显示头部和底部
最新推荐文章于 2023-01-05 15:42:24 发布