Skip to content

Instantly share code, notes, and snippets.

@Mayankgupta688
Last active June 28, 2021 06:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mayankgupta688/64c5f3e7f7ff49cbbd6fa97f2234bc01 to your computer and use it in GitHub Desktop.
Save Mayankgupta688/64c5f3e7f7ff49cbbd6fa97f2234bc01 to your computer and use it in GitHub Desktop.
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AboutComponent } from './about/about.component';
import { HeaderComponent } from './header/header.component';
import { HelpComponent } from './help/help.component';
import { DataService } from "./data.service";
const routes: Routes = [
{
path: "",
component: HeaderComponent,
resolve: {
employees: DataService
}},
{path: "about", component: AboutComponent},
{path: "help", component: HelpComponent}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment