#Angular routing error

4 messages · Page 1 of 1 (latest)

merry solar
#

I'm getting an error in v17. This worked in v16.
The error is "Navigation ID 3 is not equal to the current navigation id 4"

The command is this.router.navigate(['create', id, 'edit'], {relativeTo: this.route})
The router config section that applies is

 {
        path: 'create',
        children: [
          {
            path: ':estid',
            children: [
              {
                path: 'view',
                loadComponent: () => import('./estimateviewer/estimateviewer.component')
                  .then(mod => mod.EstimateviewerComponent)
              },
              {
                path: 'compose',
                providers: [
                  provideState(EstimateDocumentReducer),
                  provideState(EstimateCompositionReducer),
                  provideState(filesFeatureKey, Filesreducer),
                  provideEffects(UploadEffects, FilesEffects),
                  UploadtableService,
                ],
                children: [
                  {
                    path: '',
                    loadComponent: () => import('./estimatecompose/estimatecompose.component')
                      .then(mod => mod.EstimatecomposeComponent)
                  },
                  {
                    path: 'send',
                    loadComponent: () => import('./estimatecompose/estimatecompose.pdf')
                      .then(mod => mod.EstimateComposePdf)
                  }
                ]
              },
              {
                path: 'edit',
                providers: [
                  provideEffects(EstimatePdfService)
                ],
                loadComponent: () => import('./estimateedit/estimateedit.component')
                  .then(m => m.EstimateEditComponent),
                loadChildren: () => import('../../../invoicetable/src/lib/invoicetable.router.config')
                  .then(m => m.InvoiceTableRoutes)
              },
            ]
          }
        ],

      }
#

These are the router events.

I use the same router call in the same component. I have a sidebar with a list of estimates. If I click on one of them it navigates successfully. The new estimate button creates an estimate object, dispatches it to the store, then navigates to that id for edit. The second is failing.

#

Navigation to /estimates was ignored because it is the same as the current Router URL. is the last error

past forge
#

I think second navigation starts before the former has completed all its phases.