Skip to content

Instantly share code, notes, and snippets.

@adityatyagi
Created December 11, 2019 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adityatyagi/f1625ea6ee99c27a669165b4ffe5b2fe to your computer and use it in GitHub Desktop.
Save adityatyagi/f1625ea6ee99c27a669165b4ffe5b2fe to your computer and use it in GitHub Desktop.
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