Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import { NgModule } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";
import { HomeLayoutComponent } from "./home-layout/home-layout.component";
import { LandingComponent } from "./pages/landing/landing.component";
import { AboutUsComponent } from "./pages/about-us/about-us.component";
import { ContactUsComponent } from "./pages/contact-us/contact-us.component";
const routes: Routes = [
{
path: "",
component: HomeLayoutComponent,
children: [
{
path: "",
component: LandingComponent
},
{
path: "about-us",
component: AboutUsComponent
},
{
path: "contact-us",
component: ContactUsComponent
}
]
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class HomeRoutingModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.