iamisti / mdDataTable

Angular data table complete implementation of google material design based on Angular Material components.
MIT License
524 stars 132 forks source link

Problem loading mdDataTable #279

Open AbdelMonnem opened 7 years ago

AbdelMonnem commented 7 years ago

Hi. The component seems to be gratful. But i have a problem with it. when i load it to mi application nothing works and i have an error in my console: "Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.6.1/$injector/modulerr?p0=stPierreApp&p1=Erro…udflare.com%2Fajax%2Flibs%2Fangular.js%2F1.6.1%2Fangular.min.js%3A21%3A332)" The explanatin says: "Failed to instantiate module stPierreApp due to:...". I'm using angularjs 1.6.1 with angular material 1.1.3 and md-data-table 2.2.0. This is haw i declare my application in app.js: var stPierreApp = angular.module('stPierreApp', ['ngMessages', 'ngRoute', 'ngStorage', 'ngMaterial', 'mdDataTable', 'ui.router', 'ngCookies', 'mdColorPicker']); Any help please...

rvt commented 7 years ago

ABdel,

can you post to full error? Currently we cannot see it.

alan-K-R commented 7 years ago

Not a good idea to use the app name as a variable in my opinion. Do a "var = angular.module('stPierreApp......That is the issue at least from the part you show here..

AbdelMonnem commented 7 years ago

@rvt : The full error is: "Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.6.1/$injector/modulerr?p0=stPierreApp&p1=Erro…udflare.com%2Fajax%2Flibs%2Fangular.js%2F1.6.1%2Fangular.min.js%3A21%3A332) at angular.js:38 at angular.js:4759 at q (angular.js:357) at g (angular.js:4720) at eb (angular.js:4642) at c (angular.js:1838) at Mc (angular.js:1859) at pe (angular.js:1744) at angular.js:32977 at HTMLDocument.b (angular.js:3314)" @alan-K-R: maybe you are right. But i m sure that this is not the cose of my problem, becose my application was runing without problems for months before i inject the mdDataTable. Thank you for interaction frends, still looking for a solution.

alan-K-R commented 7 years ago

like @rvt said, we are in the dark here for sure, only issue can think of is:

  1. added dependency in your "package.json" (am assuming here...)
  2. you index or main html has the source path
PapsOu commented 7 years ago

Hi, I've got the same issue and it's not understandable.

The lib is included as the doc :

In app.js :

angular .module('myApp', ['ngAnimate', 'ngMaterial', 'ngRoute', "ngResource", "ngSanitize", "ngCookies", "ui.router", 'mdDataTable'])

The error is the same as AbdelMonnem.

PapsOu commented 7 years ago

Seams to be a dependency problem.

Your code is using ngMdIcons that is missing on my project.

Could you please update the documentation and list all of your inner dependencies ?

Thanks.

james-bell commented 7 years ago

I have this problem too. It seems the mdDataTable module depends on ngSanitize, ngMdIcons, and also Lodash.