我有一个带有标签的APP,我需要进入登录页面,该页面不在标签首页中。
当我执行this.router.navigate(["/login"])
时,此操作不起作用,我只能看到一个标签页。
我的app-routing.module.ts
{path: "", redirectTo: "/(homeTab:home/default//calendarTab:calendar/default//messTab:messages/default//progressTab:progress//profileTab:profile)", pathMatch:"full"},
//{ path: "", redirectTo: "/home", pathMatch: "full" },
{ path: "home", loadChildren: "~/app/home/home.module#HomeModule", outlet:"homeTab" },
{ path: "signup", loadChildren: "~/app/signup/signup.module#SignupModule"},
{ path: "newclass", loadChildren: "~/app/newclass/newclass.module#NewclassModule"},
{ path: "filterclass", loadChildren: "~/app/filterclass/filterclass.module#FilterclassModule"},
{ path: "login", loadChildren: "~/app/login/login.module#LoginModule" },
{ path: "registration", loadChildren: "~/app/registration/registration.module#RegistrationModule" },
{ path: "profile", loadChildren: "~/app/profile/profile.module#ProfileModule", outlet:"profileTab" },
{ path: "calendar", component: NSEmptyOutletComponent, loadChildren:"~/app/calendar/calendar.module#CalendarModule", outlet:"calendarTab"},
{ path: "messages", component: NSEmptyOutletComponent, loadChildren:"~/app/messages/messages.module#MessagesModule", outlet:"messTab"},
{ path: "progress", component: NSEmptyOutletComponent, loadChildren:"~/app/progress/progress.module#ProgressModule", outlet:"progressTab"}
];
当我没有登录时。我需要去/ login
this.router.navigate([“ / login”])
那不起作用