SegmentedBar: Add font-awesome icons instead of text


#1

Can we add font-awesome icons to SegmentedBar?

Thanks!


#2

Just like you do it to a Button. Assign the font family to your SegmentedBar and the items can inherit that.


#3

Thanks for your reply @manojdcoder , I was able to do it using this code:

HTML file:

<SegmentedBar class="segmented-bar fa" [items]="barItems" (selectedIndexChange)="onSelectedIndexChange($event)"></SegmentedBar>

Typescript file:

this.barItems = [];
let item1 = <SegmentedBarItem>new SegmentedBarItem();
item1.title = "\uf272";
this.barItems.push(item1);

I hope this code helps someone.