mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-09-22 05:50:48 +02:00
29 lines
581 B
TypeScript
29 lines
581 B
TypeScript
![]() |
import { ExtraOptions, RouterModule, Routes } from '@angular/router';
|
||
|
import { NgModule } from '@angular/core';
|
||
|
|
||
|
const routes: Routes = [
|
||
|
{
|
||
|
path: '',
|
||
|
loadChildren: () => import('./pages/pages.module')
|
||
|
.then(m => m.PagesModule),
|
||
|
},
|
||
|
{
|
||
|
path: '**',
|
||
|
redirectTo: '',
|
||
|
},
|
||
|
];
|
||
|
|
||
|
const config: ExtraOptions = {
|
||
|
useHash: false,
|
||
|
anchorScrolling: 'enabled',
|
||
|
onSameUrlNavigation: 'reload',
|
||
|
scrollPositionRestoration: 'enabled',
|
||
|
};
|
||
|
|
||
|
@NgModule({
|
||
|
imports: [RouterModule.forRoot(routes, config)],
|
||
|
exports: [RouterModule],
|
||
|
})
|
||
|
export class AppRoutingModule {
|
||
|
}
|