coreui / coreui-angular

CoreUI Components Library for Angular https://coreui.io/angular/docs/
https://coreui.io/angular/
MIT License
244 stars 145 forks source link

Can't get Breadcrumbs to appear #52

Closed prindacerk closed 5 years ago

prindacerk commented 5 years ago

I'm at a loss on this. I downloaded the CoreUI Angular Admin panel and ran it in my machine. The breadcrumbs work fine. Then based on the CoreUI theme, I created my own project and set up breadcrumbs. The project runs fine and all the functionality and component works. But the breadcrumbs are not visible. There's no error message or anything. It is just empty. When I look at the breadcrumb component template output in the html page, I see the following. `< ol class="breadcrumb">

  <!--bindings={}-->    
  <!--bindings={}-->    
  <!--bindings={}-->

</ ol>` Note: I had to put a space on the ol tags to prevent it from auto rendering in the output here.

Then I decided to check if the service is having any issues. I couldn't inject the breadcrumbService into my component. So I just copied the code that's happening within the service's constructor into my component and did a console output of the breadcrumb it builds. This is the output of the console message. (3) [{…}, {…}, {…}] 0: {label: {…}, url: "/"} 1: {label: {…}, url: "//"} 2: {label: {…}, url: "///dashboard"}

I can't tell if this is what the breadcrumbs property output from service should look like. If it is, then I can't understand why the component isn't rendering the correct template based on the data. What am I missing? Can someone please enlighten me?

xidedix commented 5 years ago

Hi @prindacerk Do you have data.title and path defined in your routing modules routes configs?

prindacerk commented 5 years ago

@xidedix You're right. It was the data.title that was missing. I had copied it for some of the routes but not the base routes. And that seemed to have caused some issues. Looking forward to seeing a more updated documentation for the current CoreUI template. The current documentation is related more towards V1.0 I think. So I couldn't find these guides there. Appreciate the quick support.