Skip to content

Instantly share code, notes, and snippets.

@camilogiraldo
Created January 24, 2018 02:37
Show Gist options
  • Save camilogiraldo/68f46402f530261d6b449e5fba719370 to your computer and use it in GitHub Desktop.
Save camilogiraldo/68f46402f530261d6b449e5fba719370 to your computer and use it in GitHub Desktop.
Updated app routing
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponentComponent } from './home-component/home-component.component';
const routes: Routes = [
{ path: '', pathMatch: 'full', redirectTo: 'home'},
{ path: 'home', component: HomeComponentComponent},
{ path: 'bigComponent', loadChildren: './big-module/big-module.module#BigModuleModule'} // Code modified
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment