From 2643c0d647fafd1dc165f0963c32e23aef71aef0 Mon Sep 17 00:00:00 2001 From: Pem Taira Date: Fri, 22 Apr 2016 09:52:15 +0100 Subject: [PATCH] fix: update initialization of $ correctly --- contextMenu.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contextMenu.js b/contextMenu.js index 0475482..8ab39af 100644 --- a/contextMenu.js +++ b/contextMenu.js @@ -1,3 +1,7 @@ +(function($) { + +"use strict"; + angular.module('ui.bootstrap.contextMenu', []) .service('CustomService', function () { @@ -206,7 +210,7 @@ angular.module('ui.bootstrap.contextMenu', []) var renderContextMenu = function ($scope, event, options, model, level) { /// Render context menu recursively. if (!level) { level = 0; } - if (!$) { var $ = angular.element; } + $(event.currentTarget).addClass('context'); var $contextMenu = $('
'); if ($currentContextMenu) { @@ -292,3 +296,5 @@ angular.module('ui.bootstrap.contextMenu', []) }); }; }]); + +})(angular.element);