Templarian / ui.bootstrap.contextMenu

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

Compile html string to use a custom directive in the html string #140

Closed hieutranagi47 closed 5 years ago

hieutranagi47 commented 6 years ago

Hello,

I would like to contribute a little bit of code to help user can use their custom directive in html string in an item similar:

{
    html: '<a class="dropdown-item" click2upload-file><i class="icon icon-..."></i> Upload files...<a>',
    compile: true,
    click: function ($itemScope, $event, modelValue, text, $li) {
        return;
    }
}

But currently I can not execute my custom click2uploadFile directive when I click on "Upload files" item. Thanks in advance!