I have a login screen, with the total "/ authentication / login".
How to do angular when the user enters the system, it goes straight to this route?
After logging in if he entered this route, it always validates and if the user has logged in he goes to route "/"?
Route
import { Routes } from '@angular/router';
import { FullComponent } from './layouts/full/full.component';
import { AppBlankComponent } from './layouts/blank/blank.component';
export const AppRoutes: Routes =
[
{
path: '',
component: FullComponent,
children:
[
{
path: '',
loadChildren: './dashboards/dashboards.module#DashboardsModule'
/*pathMatch: 'full',
redirectTo: '/dashboards/dashboard1', */
},
{
path: 'configuracao',
loadChildren: './paginas/configuracao/configuracao.module#ConfiguracaoModule'
},
{
path: 'arquivo',
loadChildren: './paginas/arquivo/arquivo.module#ArquivoModule'
},
{
path: 'declaracao',
loadChildren: './paginas/declaracao/declaracao.module#DeclaracaoModule'
},
{
path: 'parametro',
loadChildren: './paginas/parametro/parametro.module#ParametroModule'
},
{
path: 'endereco',
loadChildren: './paginas/endereco/endereco.module#EnderecoModule'
},
{
path: 'contribuinte',
loadChildren: './paginas/banco/banco.module#BancoModule'
},
{
path: 'dashboard',
loadChildren: './dashboards/dashboards.module#DashboardsModule'
}
]
},
{
path: '',
component: AppBlankComponent,
children:
[
{
path: 'authentication',
loadChildren: './authentication/authentication.module#AuthenticationModule'
}
]
},
{
path: '**',
redirectTo: '404'
}
];
Angle version: 5.0.0