Skip to content

Instantly share code, notes, and snippets.

@molcik
Created September 26, 2017 13:28
Show Gist options
  • Save molcik/24431c16d95d30ba99b7b3664d62507c to your computer and use it in GitHub Desktop.
Save molcik/24431c16d95d30ba99b7b3664d62507c to your computer and use it in GitHub Desktop.
import { ModuleWithProviders, NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ClassicComponent } from './classic.component';
@NgModule({
imports: [
RouterModule.forRoot([
{ path: '', redirectTo: 'classic', pathMatch: 'full' },
{ path: 'classic', component: ClassicComponent },
{ path: 'lazy', loadChildren: 'app/lazy/lazy.module#LazyModule' }
], { useHash: true })
],
exports: [
RouterModule
]
})
export class RoutingModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment