import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AppMainComponent } from './app.main.component';

export const appRouteList: Routes = [
    {
        path: 'app', component: AppMainComponent,
        loadChildren: () => import('./pages/pages.routing.module').then(m => m.PagesRoutingModule)
    },
    {
        path: '**',
        redirectTo: 'app/dashboard/dashboard'
    }
];

@NgModule({
    exports: [
        RouterModule
    ],
    imports: [
        RouterModule.forRoot(appRouteList, {
            scrollPositionRestoration: 'enabled', // Add options right here
            relativeLinkResolution: 'legacy'
        })
    ]
})
export class AppRoutingModule {
}
