Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add icon into ngx-bootstrap accordion-group heading?

Using ngx-bootstrap, how can I add an icon to accordion-group heading? For example:

<accordion-group heading="<i class='fa fa-users'></i> Users"> This content is straight in the template. </accordion-group>

like image 866
Junior Gantin Avatar asked Feb 21 '18 16:02

Junior Gantin


People also ask

How do I add an accordion icon?

You can add the icon custom css class to the Accordion header using 'iconCss' property and also add css styles to the defined class. The accordion icon element is rendered before the header text in the DOM element.


1 Answers

I think it can be done like this..

<accordion-group #group>
    <span accordion-heading>
      <i class='fa fa-users'></i> Users
    </span>
    This content is straight in the template. 
</accordion-group>
like image 156
Zim Avatar answered Oct 05 '22 21:10

Zim