Skip to content

Instantly share code, notes, and snippets.

@pazel-io
Last active October 18, 2020 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pazel-io/1575b3166794c662074adfe3755e7306 to your computer and use it in GitHub Desktop.
Save pazel-io/1575b3166794c662074adfe3755e7306 to your computer and use it in GitHub Desktop.
application router
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