javascript - Angular Datatables: Unknown provider -
hej guys.
i'm new js , angular trying implement angular-datatable version in project.
first used "angular-way", turned out bad decision based on performance. have lot of rows in table. i've decided try building datatable ajax , building columns dtoptionsbuilder , filling table using dtoptions.
however, i'm having complications... unkown provider error.. more specifically:
error: [$injector:unpr] unknown provider: datatablesprovider <- datatables <- overviewctrl
i'm not quite sure, i'm doing wrong? here's controller.
angular.module("invoices").controller("overviewctrl", ["apiservice", "datatables", 'utilsservice', "$q", "invoiceservice", "ngdialog", "$controller", "authfactory", "redirectservice", "$rootscope", overviewctrl]); function overviewctrl(apiservice, utilsservice, dtoptionsbuilder, dtcolumnbuilder, $q, invoiceservice, ngdialog, $controller, authfactory, redirectservice, $rootscope) { var number_of_timeentries_to_show = 10; var vm = this; if (!authfactory.identity.isauthenticated) { redirectservice.redirect("overview", 2, "login", 3); } vm.dtoptions = dtoptionsbuilder.fromsource(vm.latestinvoices) .withpaginationtype('full_numbers'); vm.dtcolumns = [ dtcolumnbuilder.newcolumn('companyname').withtitle('client'), dtcolumnbuilder.newcolumn('projectname').withtitle('project'), dtcolumnbuilder.newcolumn('invoiceid').withtitle('id'), dtcolumnbuilder.newcolumn('invoicedate').withtitle('inv. date'), dtcolumnbuilder.newcolumn('invoicestart').withtitle('start date'), dtcolumnbuilder.newcolumn('invoiceend').withtitle('end date'), dtcolumnbuilder.newcolumn('dkkexvat').withtitle('dkk ex vat'), dtcolumnbuilder.newcolumn('customerinvoicegroup.label').withtitle('cig'), dtcolumnbuilder.newcolumn('attention').withtitle('attention'), dtcolumnbuilder.newcolumn('custmanager').withtitle('customer manager'), dtcolumnbuilder.newcolumn('regarding').withtitle('regarding'), dtcolumnbuilder.newcolumn('duedate').withtitle('due date'), dtcolumnbuilder.newcolumn('finalized').withtitle('finalized'), dtcolumnbuilder.newcolumn('paid').withtitle('paid') ];
i've injected datatables app.module.js listed in manual.
'use strict'; (function() { angular.module('app', ['ui.router', 'invoices', 'ngdialog', 'infinite-scroll', 'datatables']); })();
thanks in advance!
Comments
Post a Comment