Skip to content

Instantly share code, notes, and snippets.

@aniketmuruskar
Created August 6, 2022 13:01
Show Gist options
  • Save aniketmuruskar/10ce164b7094d1ad423db22ddcc8f73c to your computer and use it in GitHub Desktop.
Save aniketmuruskar/10ce164b7094d1ad423db22ddcc8f73c to your computer and use it in GitHub Desktop.
Application routing module having two routes
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AppDynamicComponent } from './app-dynamic-component/app-dynamic.component';
import { AppResolver } from './shared/app.resolver';
const routes: Routes = [
{
path: 'project-overview',
component: AppDynamicComponent,
resolve: {
page: AppResolver
}
},
{
path: 'project-detail',
component: AppDynamicComponent,
resolve: {
page: AppResolver
}
}
];
@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