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先执行了