Created
January 28, 2021 11:14
-
-
Save armanozak/43a49cbbe19d0a3d987b0ac968a96fd4 to your computer and use it in GitHub Desktop.
[How to Configure Angular Modules Loaded by the Router] Configuring eager-loaded 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
// other imports are removed for brevity | |
import { FooModule } from "./foo.module"; | |
@NgModule({ | |
imports: [ | |
BrowserModule, | |
RouterModule.forRoot([ | |
{ | |
path: "", | |
loadChildren: () => 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