0

When i refresh on of my child page i am getting an error saying "cannot activate an already activated outlet". Here is my router module ts

 `const routes: Routes = [{
  path: '',
  component: citComponent, 
  children: [
  {
   path: 'citorder',
   component: citorderComponent
  }, {
   path: 'citorder/citorderdetails',
   component: citorderdetailsComponent
  },
 ],
}];

@NgModule({
 imports: [RouterModule.forChild(routes)],
 exports: [RouterModule],
})
  export class citRoutingModule { }

 export const routedComponents = [
    citComponent,
    citorderComponent,
    citorderdetailsComponent,
 ];

 `

i am redireting to citorderdetailsComponent from citorderComponent

Shelly
  • 301
  • 5
  • 18
  • 2
    Possible duplicate of [Angular 2 router, Error: Cannot activate an already activated outlet](https://stackoverflow.com/questions/41893181/angular-2-router-error-cannot-activate-an-already-activated-outlet) – Ans Bilal Feb 12 '19 at 08:29
  • 1
    Am I reading this correctly that you have two routes defined for an empty path? – DeborahK Feb 12 '19 at 08:31
  • sorry @DeborahK that was an editing mistake , i have updated the code , this is what i have excatly now – Shelly Feb 12 '19 at 09:34
  • https://stackoverflow.com/a/48252110/4431902 this answer solved my issue, any way thanks for your responce – Shelly Feb 12 '19 at 10:47

0 Answers0