Add Homepage Routing

We are going to add routing for the Homepage. This routing logic will be responsible for the routing of the homepage, allowing users to navigate between different pages in homepage. To do this, we will need to create a routing module and configure the routes for the homepage.
angular icon
app-routing.module.ts
import { RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';

const routes: Routes = [
  {
    path: '',
    pathMatch: 'full',
    loadChildren: () => import('@<%= projectName %>/<%= name %>').then((m) => m.<%= className %>Module)
  },
  {
    path: '**',
    redirectTo: '',
    pathMatch: 'full',
  },
]

@NgModule({
  imports: [RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload' })],
  exports: [RouterModule],
})
export class AppRoutingModule {}