0
I have the following scenario.
My app.routes.ts have got:
{ path: 'workflow', loadChildren: () => import('./workflow/workflow.module').then(m => m.WorkflowModule) }
In my workflow folder I have the workflow.routes.ts file with the following information:
import { InboxComponent } from "./inbox/inbox.component";
import { UsuarioComponent } from './cadastros/usuario/usuario.component';
export const WorkflowRouterConfig: Routes = [
{
path: '', component: WorkflowComponent,
children: [
{ path: 'inbox',canActivate: [AuthService], component: InboxComponent },
{ path: 'usuario',canActivate: [AuthService], component: UsuarioComponent }
]
}
];
in my Nav bar:
<a class="dropdown-item" [routerLink]="['/workflow/usuario']">Usuário</a>
shows the error when clicking on the link: Error: Viewdestroyederror: Attempt to use a destroyed view: detectChanges
the problem I see is that I am trying to access a subfolder inside the workflow called Registrations inside it I have user comment.
Has an outlet router inside your Workflowcomponent?
– Eduardo Vargas
Yes follow, import { Component } from '@angular/core'; @Component({ template:

 <router-outlet></router-outlet>

}) export class Workflowcomponent { public constructor(){ } }– Bruno Cursi