Routing is typically configured in the app-routing.module.ts
file, although it could be done in other ways. This depends entirely on your preferences.
Here is a simple example:
const routes: Routes = [
{
path: 'login',
component: AocLoginComponent,
canActivate: [AocLoginGuard],
data: {
title: of('Login')
} as AocTabConfig
},
{
path: '',
canActivate: [AocAuthGuard],
children: [
{ // DASHBOARD
path: 'dashboard',
component: DashboardComponent,
data: {
title: of('Dashboard'),
closable: false
} as AocTabConfig
},
{
path: 'users',
loadChildren: () => import('./features/schemas/users/users.module').then(m => m.UsersModule)
},
{path: '', redirectTo: 'dashboard', pathMatch: 'full'},
{path: '**', redirectTo: 'dashboard', pathMatch: 'full'}
]
}
];
The dashboard would be a tab (Tab), the login is mandatory as it is the entry page, and the users' route would open a window (Window).
Please note, browse Issues and Discussions in Github for more information