Templarian / ui.bootstrap.contextMenu

AngularJS Bootstrap UI Context Menu
MIT License
259 stars 127 forks source link

Add css class on dropdown item #130

Open lafeuil opened 6 years ago

lafeuil commented 6 years ago

Currently, when we configured an item with text attribute, a <a> tag is created with dropdown-item css class.

Could you add a new property cssClass to add some other class on this <a> tag ? This new property could accept a text or function.

This feature can solve some others demands like displaying an icon on dropdown item #21.

Before :

{
  text: '<i class="mdi mdi-pencil"></i> Rename',
  click: function () { rename() }
}

After :

{
  text: 'Rename',
  cssClass: 'mdi mdi-pencil',
  click: function () { rename() }
}