Created
June 2, 2021 18:41
-
-
Save shadow1349/424f997a6ff5173383152aec204ec4f8 to your computer and use it in GitHub Desktop.
sub-route for app-routing module
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
import { NgModule } from '@angular/core'; | |
import { RouterModule, Routes } from '@angular/router'; | |
import { LandingRouteComponent } from './landing-route.component'; | |
/** | |
* Since this route is lazy loaded in the app-routing.module.ts we will declare a blank | |
* path here and give it the component we wish to load at the current route. | |
*/ | |
const routes: Routes = [{ path: '', component: LandingRouteComponent, children: [ | |
{ path: 'variation1', loadChildren: () => import('./variation-1/variation-1.module.ts').then((mod) => mod.Variation1Module) } | |
] }]; | |
@NgModule({ | |
imports: [RouterModule.forChild(routes)], | |
exports: [RouterModule], | |
}) | |
export class LandingRouteRoutingModule {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment