Skip to content

Instantly share code, notes, and snippets.

@armanozak
Created January 28, 2021 11:10
Show Gist options
  • Save armanozak/3185c1b2a5359cf8110be395d3172f2f to your computer and use it in GitHub Desktop.
Save armanozak/3185c1b2a5359cf8110be395d3172f2f to your computer and use it in GitHub Desktop.
[How to Configure Angular Modules Loaded by the Router] Configuring child module in root module #blog #angular
@NgModule({
imports: [
BrowserModule,
RouterModule.forRoot([
{
path: "",
loadChildren: () =>
import("./foo.module").then(m => m.FooModule.asChild("bar"))
}
])
],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment