我已经创建了用于绑定数据表的代码。我不知道该怎么办?如何解决此问题。欢迎提出任何建议。
app.controller('ImporatanceTypeCtrl', ['$scope', '$http', '$state', 'httpService', '$modal', '$log', '$stateParams', function ($scope, $state, httpService, $modal, $log, $stateParams, DTOptionsBuilder, $http) {
$scope.dtOptions = DTOptionsBuilder.newOptions()
.withDOM(
"<'row'<'col-sm-12'tr>>" +
"<SSS<'col-sm-5'l><'col-sm-7'p>>");
//My Function Codes Here..
}
答案 0 :(得分:0)
依赖注入只是一个小问题。您的代码应如下所示:
app.controller('ImporatanceTypeCtrl', ['$scope', '$state', 'httpService', '$modal', '$log', '$stateParams', 'DTOptionsBuilder', '$http', function ($scope, $state, httpService, $modal, $log, $stateParams, DTOptionsBuilder, $http) {
有关依赖项注入的Angularjs文档:https://docs.angularjs.org/guide/di