Unable to load ngTable: "Module 'ngTable' is not available!"
I am trying to use ngTable in my application and I am doing the following steps:
1) import ngTable css file
2) import ngTable.js file
3) add 'ngTable' to my angular.module ('app', [xxx, yyy, 'ngTable] as I have done for countless other libraries
4) copy the example code to my controller (and enter "ngTableParams")
Result: when I try to load the page I get:
Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module ngTable due to:
Error: [$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.
I looked around but found nothing. I can't figure out why this won't work ... I would appreciate any input.
source to share
I get the same error until I start downloading ngTable
after downloading myself ngTable
.
Below is a snippet from mine index.html
to highlight the solution.
<script src="web/vendor/bower_components/angular-1.7.2/angular.min.js"></script>
<script src="web/vendor/bower_components/angular-1.7.2/angular-route.min.js"></script>
<link rel="stylesheet"; href="https://unpkg.com/ng-table@3.0.1/bundles/ng-table.min.css">
<script src="https://unpkg.com/ng-table@3.0.1//bundles/ng-table.min.js"></script>
source to share