Created
January 28, 2021 11:10
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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