I'm trying to get a jquery-ui menu to work inside an AngularJS directive.
I have tried this fiddle with an example of what I'm trying to do.
html:
<div ng-app="myApp" ng-controller="mainController">
<ul j-menu>
<li>Test 1</li>
<li>Test 2</li>
</ul>
</div>
js:
var myapp = angular.module("myApp", []);
myapp.directive("jMenu", function() {
return {
restrict: "A",
link: function(scope, element, attrs) {
$(element).menu();
}
}
});
myapp.controller("mainController", ['$scope', function($scope) {}]);
The most perplexing piece is that I have modified another 'working' fiddle to do exactly what I want to do but cannot replicate in my own fiddle nor in my own dev env.
What am I missing?!
scope: {}?