Skip to content

Instantly share code, notes, and snippets.

@rahulsahay19
Created November 14, 2017 14:37
Show Gist options
  • Save rahulsahay19/ddbe449b64e33321bd2b5c8181449027 to your computer and use it in GitHub Desktop.
Save rahulsahay19/ddbe449b64e33321bd2b5c8181449027 to your computer and use it in GitHub Desktop.
app-routing-module
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