|
|
|
@ -1,4 +1,9 @@ |
|
|
|
import { DynamicLayoutComponent } from '@abp/ng.core'; |
|
|
|
import { |
|
|
|
DynamicLayoutComponent, |
|
|
|
AuthGuard, |
|
|
|
ReplaceableComponents, |
|
|
|
ReplaceableRouteContainerComponent, |
|
|
|
} from '@abp/ng.core'; |
|
|
|
import { NgModule } from '@angular/core'; |
|
|
|
import { RouterModule, Routes } from '@angular/router'; |
|
|
|
import { LoginComponent } from './components/login/login.component'; |
|
|
|
@ -11,11 +16,36 @@ const routes: Routes = [ |
|
|
|
path: '', |
|
|
|
component: DynamicLayoutComponent, |
|
|
|
children: [ |
|
|
|
{ path: 'login', component: LoginComponent }, |
|
|
|
{ path: 'register', component: RegisterComponent }, |
|
|
|
{ |
|
|
|
path: 'login', |
|
|
|
component: ReplaceableRouteContainerComponent, |
|
|
|
data: { |
|
|
|
replaceableComponent: { |
|
|
|
key: 'Account.LoginComponent', |
|
|
|
defaultComponent: LoginComponent, |
|
|
|
} as ReplaceableComponents.RouteData<LoginComponent>, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'register', |
|
|
|
component: ReplaceableRouteContainerComponent, |
|
|
|
data: { |
|
|
|
replaceableComponent: { |
|
|
|
key: 'Account.RegisterComponent', |
|
|
|
defaultComponent: RegisterComponent, |
|
|
|
} as ReplaceableComponents.RouteData<RegisterComponent>, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: 'manage-profile', |
|
|
|
component: ManageProfileComponent, |
|
|
|
component: ReplaceableRouteContainerComponent, |
|
|
|
canActivate: [AuthGuard], |
|
|
|
data: { |
|
|
|
replaceableComponent: { |
|
|
|
key: 'Account.ManageProfileComponent', |
|
|
|
defaultComponent: ManageProfileComponent, |
|
|
|
} as ReplaceableComponents.RouteData<ManageProfileComponent>, |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
|