Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { NgModule } from '@angular/core';
- import { RouterModule, Routes } from '@angular/router';
- const routes: Routes = [
- { path: 'home', loadChildren: () => import('./home/home.module').then(m => m.HomeModule) },
- { path: 'user', loadChildren: () => import('./user/user.module').then(m => m.UserModule) },
- {
- path: '',
- pathMatch: 'full',
- redirectTo: 'home'
- }
- ];
- @NgModule({
- declarations: [],
- imports: [
- RouterModule.forRoot(routes, { useHash: true })
- ],
- exports: [RouterModule]
- })
- export class AppRoutingModule { }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement