Router error

Hi Radzen team,
i receive the following error when i navigate to the “partners” page in my app. The page exists an the name is correct.
Can you help me please?

core.js:1440 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: ‘partners’
Error: Cannot match any routes. URL Segment: ‘partners’
at ApplyRedirects.noMatchError (router.js:1719)
at CatchSubscriber.eval [as selector] (router.js:1684)
at CatchSubscriber.error (catchError.js:105)
at MapSubscriber.Subscriber._error (Subscriber.js:134)
at MapSubscriber.Subscriber.error (Subscriber.js:108)
at MapSubscriber.Subscriber._error (Subscriber.js:134)
at MapSubscriber.Subscriber.error (Subscriber.js:108)
at MapSubscriber.Subscriber._error (Subscriber.js:134)
at MapSubscriber.Subscriber.error (Subscriber.js:108)
at LastSubscriber.Subscriber._error (Subscriber.js:134)
at ApplyRedirects.noMatchError (router.js:1719)
at CatchSubscriber.eval [as selector] (router.js:1684)
at CatchSubscriber.error (catchError.js:105)
at MapSubscriber.Subscriber._error (Subscriber.js:134)
at MapSubscriber.Subscriber.error (Subscriber.js:108)
at MapSubscriber.Subscriber._error (Subscriber.js:134)
at MapSubscriber.Subscriber.error (Subscriber.js:108)
at MapSubscriber.Subscriber._error (Subscriber.js:134)
at MapSubscriber.Subscriber.error (Subscriber.js:108)
at LastSubscriber.Subscriber._error (Subscriber.js:134)
at resolvePromise (zone.js:814)
at resolvePromise (zone.js:771)
at eval (zone.js:873)
at ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:4724)
at ZoneDelegate.invokeTask (zone.js:420)
at Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
at ZoneTask.invokeTask [as invoke] (zone.js:500)
at invokeTask (zone.js:1540)

Regards
Thomas

Is there a route defined for that path in the client\src\app\app.routes.ts file? How do you navigate to that page?

I navigate from the Menu to the page.

This is the only entry in client\src\app\app.routes.ts:

  {
    path: 'partners/:Rolle',
    canActivate: [AuthGuard],
    data: {
      roles: ['Authenticated'],
    },
    component: PartnersComponent
  },

I navigate from another page to partners. There i have a paramter “Rolle”. From the menu i navigate there without the parameter.

Regards
Thomas

This explains it. At the moment route parameters are mandatory which means you cannot navigate to a page without specifying the parameters it needs.

Ah… ok.
at the moment… :thinking:
Are there plans to change this? Or is it generally impossible?
i would like to have pages with different parameters.
e.g. partners page… called from many other pages with different parameters.

Its surely not so important cause i can copy pages. Its only a bit confusing in a greater app. I’ll try to solve this with the page name. e.g. page name “partner_rolle” or something like this.

Kind Regards

You can have pages with different parameters. You cannot however have pages with optional parameters - you have to specify a value for every parameter.

Ok.
Thank you Atanas.

Regards
Thomas