This commit is contained in:
Taric Xin
2022-01-24 17:00:12 +08:00
parent eff67c4b0f
commit 0e8b1def3f
4 changed files with 13 additions and 13 deletions

View File

@ -21,12 +21,12 @@ const alainProvides = [{ provide: ALAIN_CONFIG, useValue: alainConfig }];
// #region reuse-tab
import { RouteReuseStrategy } from '@angular/router';
alainProvides.push({
provide: RouteReuseStrategy,
useClass: ReuseTabStrategy,
deps: [ReuseTabService]
} as any);
// import { RouteReuseStrategy } from '@angular/router';
// alainProvides.push({
// provide: RouteReuseStrategy,
// useClass: ReuseTabStrategy,
// deps: [ReuseTabService]
// } as any);
// #endregion
@ -51,9 +51,9 @@ export class GlobalConfigModule {
throwIfAlreadyLoaded(parentModule, 'GlobalConfigModule');
// NOTICE: Only valid for menus with reuse property
// Pls refer to the E-Mail demo effect
reuseTabService.mode = ReuseTabMatchMode.MenuForce;
// reuseTabService.mode = ReuseTabMatchMode.MenuForce;
// Shouled be trigger init, you can ingore when used `reuse-tab` component in layout component
reuseTabService.init();
// reuseTabService.init();
}
static forRoot(): ModuleWithProviders<GlobalConfigModule> {