Skip to content

Instantly share code, notes, and snippets.

@rahulsahay19
Created November 14, 2017 14:49
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 rahulsahay19/e39cb72116a823d2ca626764c91b0964 to your computer and use it in GitHub Desktop.
Save rahulsahay19/e39cb72116a823d2ca626764c91b0964 to your computer and use it in GitHub Desktop.
app-routing-module.ts
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import InlineComponent from './inline.component';
import { MoviesComponent } from './movies/movies.component';
var providers;
const appRoutes: Routes = [
{
path: 'dynamic',
loadChildren: () => {
return import('./dynamic.module').then((comp:any)=>{
return comp.default;
});
}
},
{
path: '',
component: InlineComponent
}
];
export const routes: ModuleWithProviders = RouterModule.forRoot(appRoutes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment