I am a beginner in Angular, and I work on a template with Nebular . Our authentication page (login) does not exist in the folder src, but in the folder node_modules, and I want to make the login page appears first when I open my interface, but I could not achive it. When I try to generate a new login component in the src folder, I found many problems that I didn't understand.
In src/app/app-routing.module.ts,
change
{ path: '', redirectTo: 'pages', pathMatch: 'full' },`
in to
{ path: '', redirectTo: 'auth', pathMatch: 'full' },
Edit the routing file of your apps app.routes.ts
.
export const AppRoutes: Routes = [
{
path: '',
redirectTo: '/your-login-url',
pathMatch: 'full'
}
]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.