datatables-angular-directive icon indicating copy to clipboard operation
datatables-angular-directive copied to clipboard

Module 'datatablesDirectives' is not available! error

Open burakkilic opened this issue 11 years ago • 5 comments

Hi;

I am getting: Module 'datatablesDirectives' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

In app.js, I write this:

angular.module('mean.shops', ['datatablesDirectives']);

Where am I wrong?

burakkilic avatar Aug 19 '14 20:08 burakkilic

Well, it says that you either misspelled the module or forgot to load it.

This is how I spelled it:

angular.module('datatablesDirectives', []).directive('datatable', function ($http) {

Did you forget to load it?

<script type="text/javascript" src="angular.datatables.js"></script>

maktouch avatar Aug 20 '14 09:08 maktouch

I am having a similar error when just trying to load 'datatables'.

angular.module('pricingOptionsTable', ['resources.pricingOptions', 'datatables'])
    .controller('pricingDataController', ['$scope', 'poResource', 'DTOptionsBuilder', PricingDataController])
    .directive('pricingDataTable', ['$http', '$templateCache', '$compile', PricingDataTable]);

Then, in my controller I have:

function PricingDataController($scope, poResource, DTOptionsBuilder) {

In my index.html I have:

    <script src="bower_components/jquery/dist/jquery.js"></script>
    <script src="bower_components/datatables/media/js/jquery.dataTables.js"></script>
    <script src="bower_components/angular/angular.js"></script>
    <script src="bower_components/angular-datatables/dist/angular-datatables.js"></script>

I am using AngularJS 1.3.9, jQuery 2.1.3, Angular Datatables 0.4.0 and Datatables 1.10.4

zimmul avatar Feb 04 '15 04:02 zimmul

Same issue.

jmpokar avatar Jul 09 '15 07:07 jmpokar

Any Resolutions guys ? Please post here if anybody cracked this till now.

ankryption avatar Feb 04 '16 04:02 ankryption

Hey,

When I made this a few years ago, Datatables 1.10 wasn't released (or wasn't table). This thing require 1.9.4.

It might be the problem.

maktouch avatar Feb 04 '16 04:02 maktouch