0

I have cloned the Sakai angular skeleton from here: git clone https://github.com/primefaces/sakai-ng.git

By default, the 'landing' URL points to the Sakai demo. I want my base URL to point to my application, while keeping Sakai's demo as a reference (at least during the dev phase). For that, I want to reroute the whole sakai demo to a 'sakai' route, in such a way that:

  • "myUrl/#/sakai" takes me to the Sakai Dashboard,
  • "MyUrl/#/sakai/uikit/formlayout" takes me to the specific 'UIKit/Form Layout' demo,
  • etc for every Sakai demo page...

So in my app-routing.module.ts, I have done:

RouterModule.forRoot([
    // My Application
    //{ path: '', component: HomeComponent },

    // Sakai
    {
        path: 'sakai', component: AppLayoutComponent,
        children: [
            { path: '', loadChildren: () => import('./sakai/components/dashboard/dashboard.module').then(m => m.DashboardModule) },
            { path: 'uikit', loadChildren: () => import('./sakai/components/uikit/uikit.module').then(m => m.UikitModule) },
            { path: 'utilities', loadChildren: () => import('./sakai/components/utilities/utilities.module').then(m => m.UtilitiesModule) },
            { path: 'documentation', loadChildren: () => import('./sakai/components/documentation/documentation.module').then(m => m.DocumentationModule) },
            { path: 'blocks', loadChildren: () => import('./sakai/components/primeblocks/primeblocks.module').then(m => m.PrimeBlocksModule) },
            { path: 'pages', loadChildren: () => import('./sakai/components/pages/pages.module').then(m => m.PagesModule) },
        ],
    },
    // code continues...

But doing so doesn't work properly with the demo's left-side menu as it keeps using the old route for the links: MyUrl/#/uikit/formlayout instead of : MyUrl/#/sakai/uikit/formlayout

I tried to fiddle inside the Sakai components' own routing modules without success.

Can anyone tell me how I can achieve this?

1 Answers1

0

You have to adjust the dashboard routerLinks in

src/app/layout/app.menu.component.ts
Don
  • 366
  • 1
  • 10