emilol / angular-crumbs

Angular Breadcrumb
https://emilol.github.io/angular-crumbs
MIT License
46 stars 46 forks source link

Breadcrumb is changing but child component is not loading #7

Closed shailendra4chat closed 6 years ago

shailendra4chat commented 6 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

Current behavior

I have copied your sample code and implemented in my project, breadcrumb is changing but child component is not loading. Even i checked in console there is not error. please suggest.

Expected behavior

It should load child component.

Minimal reproduction of the problem with instructions

{ path: 'overall', component: OverallPageComponent, data: { breadcrumb: 'Overall'}, children: [ { path: 'project', component: ProjectPageComponent, data: { breadcrumb: 'Project'}} ] }

What is the motivation / use case for changing the behavior?

Environment


Angular version: X.Y.Z


Browser:
- [X ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: XX   V6.9.1
- Platform:   Windows

Others:

emilol commented 6 years ago

Can you provide a plunker that demonstrates your issue?

SchubertDNS commented 6 years ago

I had a similar issue, but I forgot to add the router-outlet on the according parent. Please check from the above referenced plunker example:

@Component({
  selector: 'parent',
  template: `
    <p>This is the parent component!</p>
    <router-outlet></router-outlet>
  `
})
export class Parent { }

Hope this helps!