I am trying to create breadcrumbs from an array of strings. I have an array property called taxonomyand it looks like ["categories", "clothing", "men", "suits"]. Using dom-repeatas follows:
<template is="dom-repeat" items="{{taxonomy}}" id="breadcrumbs">
<span>{{item}}</span><span hidden$="[[computeSpanHidden]]"> > </span>
</template>
The resulting view is as follows:
Categories> Clothing> Men> Costumes>
I would like to delete the last to get something like this:
Categories> Clothing> Men> Costumes
I tried to do this by attaching to the hidden attribute of the range that I want to hide, but I'm stuck. An incomplete function is computeSpanHiddenas follows:
computeSpanHidden: function(){
if(this.taxonomy.slice(-1)[0] == )
{ return true; }
else
{ return false; }
}
source
share