Skip to content

Conversation

hoeni
Copy link

@hoeni hoeni commented Sep 1, 2015

This way one can use icons in the menu elements like

      $scope.menuOptions = function(program) {
        return [
          [function() {return '<i class="fa fa-fw fa-pencil"></i> edit'},
            function ($itemScope) { console.log('edit') } ],
        ];
      };

If this shouldn't be the default I'd suggest a 4th parameter to each element containing options, to be open for future extensions:

      $scope.menuOptions = function(program) {
        return [
          [function() {return '<i class="fa fa-fw fa-pencil"></i> edit'},
            function ($itemScope) { console.log('edit') },
            true,
            {allowHtml: true}
          ],
        ];
      };

@SuricateCan
Copy link
Contributor

I am working on a huge addition at the moment and a feature related to this will be on it.

SuricateCan pushed a commit to SuricateCan/ui.bootstrap.contextMenu that referenced this pull request Oct 13, 2015
Several additions:
* Issues:
   - Templarian#22 Adding a context menu class name to dropdown: Class ng-bootstrap-contextmenu is now appended to the holding div;
* Pull Requests
   - Templarian#17 Added a event for opening: Added event for opening, after open and after closed;
   - Templarian#21 Allow icons (as HTML) in menu item: Not as html, but the new builder api handles the icon submission;
   - Templarian#25 Added support for item text promise: The text is now wrapped inside a $q.when function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants