首页 新闻 搜索 专区 学院

angular自定义指令模板中使用了第三方指令,好像不起作用?

0
[待解决问题]

appModule.directive("selecttable", ['DTOptionsBuilder','DTColumnBuilder',
function (DTOptionsBuilder, DTColumnBuilder) {
return {
restrict: 'AE',
//scope:{
// apiUrl: '@',
// dtColumns:'='
//},
//require: '^?datatable',
//require: 'ngModel',
template: "<div class=\"dropdown custom-select\">\n" +
"<div class=\"input-group\">\n" +
"<input type=\"text\" class=\"form-control\" />\n" +
"<span class=\"input-group-addon\" ng-click=\"vm.dropdown = !vm.dropdown\">\n" +
"<i class=\"glyphicon glyphicon-chevron-down\"></i>\n" +
"</span>\n" +
"</div>\n" +
"<div class=\"dropdown-menu collapse \" ng-class=\"{in: vm.dropdown}\">\n" +
"<table datatable dt-options=\"dtOptions\" dt-columns=\"dtColumns\" dt-instance=\"dtInstance\" class=\"table table-striped table-bordered table-hover\"> </table>\n" +
"</div>\n" +
"</div>\n",

 

如上,如何让datatable指令起作用呢?

问题补充:

好像是datatable指令的link先执行了

flyfish1986的主页 flyfish1986 | 初学一级 | 园豆:6
提问于:2016-09-01 15:50
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册