【发布时间】:2016-07-17 23:47:00
【问题描述】:
我是 angular 新手,并尝试使用 mmenu 创建指令,但不幸的是插件无法正常工作。 任何帮助都会很棒。
我创建了一个plunker。
谢谢,
var App = angular.module('wdapp', []);
App.controller('results', function($scope, $http) {
$http.get('data.json')
.then(function(res){
$scope.bookmarks = res.data;
});
});
App.directive("mmenu", function()
{
return {
restrict: "A",
link: function(scope, element, attrs){
$(element).mmenu({
offCanvas: false,
//counters: true,
searchfield: {
add: false,
//search: false,
},
header: {
add: true,
update: true,
title: "Navigation"
},
navbar: {
title: ""
},
});
}
};
});
【问题讨论】: