diff --git a/templates/module/angular/projects/my-project-name/src/lib/my-project-name-routing.module.ts b/templates/module/angular/projects/my-project-name/src/lib/my-project-name-routing.module.ts index 5ef00189aa..c1018686fe 100644 --- a/templates/module/angular/projects/my-project-name/src/lib/my-project-name-routing.module.ts +++ b/templates/module/angular/projects/my-project-name/src/lib/my-project-name-routing.module.ts @@ -1,4 +1,10 @@ -import { AuthGuard, DynamicLayoutComponent, PermissionGuard } from '@abp/ng.core'; +import { + AuthGuard, + DynamicLayoutComponent, + PermissionGuard, + ReplaceableComponents, + ReplaceableRouteContainerComponent, +} from '@abp/ng.core'; import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { MyProjectNameComponent } from './components/my-project-name.component'; @@ -8,8 +14,19 @@ const routes: Routes = [ path: '', component: DynamicLayoutComponent, canActivate: [AuthGuard, PermissionGuard], - data: { requiredPolicy: '' }, - children: [{ path: '', component: MyProjectNameComponent }], + children: [ + { + path: '', + component: ReplaceableRouteContainerComponent, + data: { + requiredPolicy: '', + replaceableComponent: { + defaultComponent: MyProjectNameComponent, + key: 'MyProjectName.MyProjectNameComponent', + } as ReplaceableComponents.RouteData, + }, + }, + ], }, ];