Skip to content

Routing Configuration

Abhay Chawla edited this page Oct 2, 2018 · 3 revisions

Follow the following steps to setup routing:

  1. Navigate to the required routing module module-name-routing.module.ts:
  • to ensure routing with app shell import
import { Route } from '../core/route/route.service';

import { extract } from '../core/i18n/i18n.service';
  • import the required components for routing
import { ComponentName } from './component-path.component' 
  1. Declare the routes:
const routes: Routes = [
  Route.withShell([
    {
      path: 'path-name',
      component: ComponentName,
      data: { title: extract('Title') },
      children: [
        {...}
      ]
    }
  ])
];

For reference, please look at:

clients/clients-routing.module.ts

accounting/accounting-routing.module.ts

self-service/self-service-routing.module.ts