天道酬勤,学无止境

ng-alain

ng-alain 复用标签相关设置

排除复用import { ReuseTabMatchMode, ReuseTabService } from '@delon/abc'; export class StartupService { constructor( private reuseTabService: ReuseTabService, private inj: Injector) { } load(): Promise{ // only works with promises const pLoadData = new Promise(async (resolve, reject) => { // reuse-tab 是否重用页面,把这个页面排除了,所以只要跳转到别的页面 目标tab就会消失 this.reuseTabService.mode = ReuseTabMatchMode.URL; const excludes = new Array(); excludes.push(new RegExp('/target-route')); this.reuseTabService.excludes = excludes; resolve({}); }); return pLoadData; } }参考资料feat(abc: reuse-tab): new reuse-tab component plans

2021-05-18 15:08:02    分类:博客    ng-alain    编程开发