Last active
October 18, 2020 06:11
-
-
Save pazel-io/1575b3166794c662074adfe3755e7306 to your computer and use it in GitHub Desktop.
application router
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NgModule } from '@angular/core'; | |
import { Routes, RouterModule } from '@angular/router'; | |
const routes: Routes = [ | |
{ | |
path: '', | |
redirectTo: 'home', | |
pathMatch: 'full', | |
}, | |
{ | |
path: 'home', | |
loadChildren: () => import('./home/home.module').then((m) => m.HomeModule), | |
}, | |
{ | |
path: 'map', | |
loadChildren: () => import('./map/map.module').then((m) => m.MapModule), | |
}, | |
]; | |
@NgModule({ | |
imports: [RouterModule.forRoot(routes, { useHash: true })], | |
exports: [RouterModule] | |
}) | |
export class AppRoutingModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment