-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ refactor(security-routing): 更新路由配置和标题策略服务,简化应用组件的加载逻辑
- Loading branch information
Showing
6 changed files
with
18 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import {Routes} from '@angular/router'; | ||
import {PageNotFoundComponent} from "../pages/page-not-found/page-not-found.component"; | ||
|
||
export const routes: Routes = [{ | ||
path: 'home', loadChildren: () => import('../pages/pages.module').then(m => m.PagesModule) | ||
}, | ||
export const routes: Routes = [ | ||
{ | ||
path: 'home', loadChildren: () => import('../pages/pages.module').then(m => m.PagesModule) | ||
}, | ||
{ | ||
path: 'auth', loadChildren: () => import('../pages/security/security.module').then(m => m.SecurityModule) | ||
}, | ||
{path: '', pathMatch: 'full', redirectTo: '/auth'}, | ||
{path: '', pathMatch: 'full', redirectTo: 'auth'}, | ||
{path: '**', component: PageNotFoundComponent} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 5 additions & 9 deletions
14
ui-work/projects/web/src/pages/security/security-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
import {NgModule} from '@angular/core'; | ||
import {RouterModule, Routes, TitleStrategy} from '@angular/router'; | ||
import {RouterModule, Routes} from '@angular/router'; | ||
import {LoginComponent} from "./login/login.component"; | ||
import {PageTitleStrategy} from "../../core/title-strategy.service"; | ||
import {LoginV1Component} from "./loginv1/login.component"; | ||
|
||
const routes: Routes = [ | ||
{path: 'login', component: LoginComponent, title: "系统登录"}, | ||
{path: 'login1', component: LoginV1Component, title: "系统登录"}, | ||
{path: '', component: LoginComponent} | ||
{path: 'login', component: LoginComponent, title: '登录'}, | ||
{path: 'login1', component: LoginV1Component, title: '登录V1'}, | ||
{path: '', redirectTo: 'login', pathMatch: 'full'} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule], | ||
providers: [ | ||
{provide: TitleStrategy, useClass: PageTitleStrategy}, | ||
] | ||
exports: [RouterModule] | ||
}) | ||
export class SecurityRoutingModule { | ||
} |