Commit d7bd09f4 authored by wangqinghua's avatar wangqinghua

路由重定向

parent 6f6fc27e
...@@ -45,7 +45,7 @@ import {BConfigComponent} from './business/b-config/b-config.component'; ...@@ -45,7 +45,7 @@ import {BConfigComponent} from './business/b-config/b-config.component';
import {SignalComponent} from './shared/signal/signal.component'; import {SignalComponent} from './shared/signal/signal.component';
export const route: Routes = [ export const route: Routes = [
{path: '', redirectTo: 'app/main/home', pathMatch: 'full'}, {path: '', redirectTo: 'app/main/home', pathMatch: 'prefix'}, //空路由定向
{ {
path: 'app', component: AppComponent, path: 'app', component: AppComponent,
children: [ children: [
...@@ -97,5 +97,5 @@ export const route: Routes = [ ...@@ -97,5 +97,5 @@ export const route: Routes = [
}, },
] ]
}, },
{path: '*', component: AppComponent, canActivate: [LoginGuard]}, {path: '**', redirectTo: 'app/main/home', pathMatch: 'full'}, //未找到的路由 重定向
]; ];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment