Bonjour,
je voudrais intégrer le module ng-table d'angular.alors je l'ai installer ensuite j'ai essayé d'appliquer l'example suivant mais j'ai eu cette erreur dans le console :
Error: [$injector:modulerr] Failed to instantiate module testTApp due to:
[$injector:modulerr] Failed to instantiate module ngTable due to:
[$injector:nomod] Module 'ngTable' 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.
http://errors.angularjs.org/1.6.3/$injector/nomod?p0=ngTable
minErr/<@http://localhost:9000/bower_components/angular/angular.js:66:12
module/<@http://localhost:9000/bower_components/angular/angular.js:2257:17
ensure@http://localhost:9000/bower_components/angular/angular.js:2178:38
module@http://localhost:9000/bower_components/angular/angular.js:2255:14
loadModules/<@http://localhost:9000/bower_components/angular/angular.js:4896:22
forEach@http://localhost:9000/bower_components/angular/angular.js:402:11
loadModules@http://localhost:9000/bower_components/angular/angular.js:4880:5
loadModules/<@http://localhost:9000/bower_components/angular/angular.js:4
Oui ,je le fais comme ceci
angular
.module('testTApp', ["ngTable"]);
Mais ne fonctionne pas toujours
comme ça :
<link rel="stylesheet" href="styles/main.css">
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/bootstrap-sass-official/assets/javascripts/bootstrap.js"></script>
<script src="scripts/app.js"></script>
<script src="scripts/controllers/main.js"></script>
je ne comprends rien à ton code... ton script contenant ton application AngularJS est appelé avant ou après celui contenant ngTable ?
<link rel="stylesheet" href="styles/main.css">
<!-- endbuild -->
<!-- build:js(.) scripts/vendor.js -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/bootstrap-sass-official/assets/javascripts/bootstrap.js"></script>
<!-- endbower -->
<!-- endbuild -->
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/app.js"></script>
<script src="scripts/controllers/main.js"></script>
<!-- endbuild -->
non je l'avais mis sauf que au moment ou je lance grunt serve ,il le supprime automatiquement et je savais pas pourquoi!!!
j'ai crée un new project ,coté grunt y a pas de problème mais l'erreur cote ng-table reste toujours
voilà mes nouvelles erreurs :
GET
http://localhost:9000/node_modules/ng-table/bundles/ng-table.js [HTTP/1.1 404 Not Found 53ms]
GET
http://localhost:35729/livereload [HTTP/1.1 101 Switching Protocols 59ms]
Error: [$injector:modulerr] Failed to instantiate module testNgTableApp due to:
[$injector:modulerr] Failed to instantiate module ngTable due to:
[$injector:nomod] Module 'ngTable' 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.
http://errors.angularjs.org/1.6.3/$injector/nomod?p0=ngTable
minErr/<@http://localhost:9000/bower_components/angular/angular.js:66:12
module/<@http://localhost:9000/bower_components/angular/angular.js:2257:17
ensure@http://localhost:9000/bower_components/angular/angular.js:2178:38
module@http://localhost:9000/bower_components/angular/angular.js:2255:14
loadModules/<@http://localhost:9000/bower_components/angular/angular.js:4896:22
forEach@http://localhost:9000/bower_components/angular/angular.js:402:11
loadModules@http://localhost:9000/bower_components/angular/angular.js:4880:5
loadModules/<@http://localhost:9000/bower_components/angular/angula angular.js:66:12
Bonsoir.
Comment tu fais pour ne pas comprendre le problème ?
http://localhost:9000/node\_modules/ng-table/bundles/ng-table.js [HTTP/1.1 404 Not Found 53ms]
Il est tout simplement spécifié que le fichier ne peut pas être trouvé dans le chemin spécifié.
Tu devrais quand même être capable de comprendre cette erreur.
@Lartak j'avais bien compris le problème du mon programme sauf que je vois d'ou vient ce problème car la config me semble correcte
Elle te semble l'être mais elle ne l'est pas. Donc revérifie bien tout.
J'ajouterais même que, dans 99.99999% des cas, la source du bug se trouve entre la chaise et le clavier.