Mayur
Mayur

Reputation: 1143

How to populate Breadcrumbs in Angular js with links?

i have created a grid on double clicking the item, grid traverse inside that folder so according to it i want to populate breadcrumbs. I am not getting any solution how do i start it. My demo link below:

when clicked on 'Moroni' then it should update breadcrumbs by Home / Moroni

Upvotes: 0

Views: 350

Answers (1)

mainguy
mainguy

Reputation: 8331

Although I don't understand your filtering behaviour, here is what to do:

Setup your gridOptions:

  $scope.gridOptions = {
    data: 'myData',
    selectedItems:[],
    multiSelect: false,
    filterOptions: $scope.filterOptions,
    rowTemplate: rowTempl,
  };

Note the selectedItems array and that multiSelect is set to false so you can only select 1 row at a time.

In your html change the breadcrumb div to:

<div id="Breadcrumbs"> Home /{{gridOptions.selectedItems[0].name}}</div>

It seems that Plunker is down at the moment, so I can give you no forked example...

Plunker is back again

Upvotes: 1

Related Questions