New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examples seem to list incorrect dependency name #266
Comments
All examples work fine. ngTable is the name of module. The string angular.module('main', ['ngTable']) means the main module depends on ngTable module. ngTableParams is the name of service, so the changing 'ngTable' to 'ngTableParams' is wrong. |
I have the exactly the same issue. I understand that you are saying the example is correct, but if so, why is the error Unknown provider: ngTableProvider <- ngTable being thrown? |
Well, changing the code to:
worked for me. |
In what class? Thank you! -Michael
|
Those are my dependencies for a controller. |
I had the exact same issue and the same remedy worked. I trust the maintainer that this is not a bug, but I am extremely curious as to the explanation. |
This continues to be an issue for me as well. Am curious as to status & resolution, if any. No matter how I inject of reference ngTable, I keep getting same Error: [$injector:unpr] Unknown provider: ngTableProvider <- ngTable Thank you for your time. |
I had the exact same issue and the same remedy worked. |
Thank the lord I finally found this post..I should have paid more attention to the 'understanding controllers' section of the AJ dev guide, particularly setting up the initial state. This solved all my problems. Here's my full code for others app.controller('DemoCtrl', ['$scope', '$filter', '$sce', 'ngTableParams', function ($scope, $filter, $sce, ngTableParams){ |
I looked at some demos on Codepen, and it seams, that the name has changed: |
Thanks @herrminni changing to NgTableParams to a capital "N" worked for me. My code had been working since sometime last year and I had not changed anything, which lead to me to suspecting that one of the libraries that I was using had changed. Thank you for validating my initial thoughts and giving me a solution to my issue Proof that it works http://kronusproductions.com/songs_angular/# |
In order to use ngTable module you need to follow the steps in http://ng-table.com Mind that |
I'm new to Angular, so forgive me if this is totally wrong, but the examples show something similar to this:
var app = angular.module('main', ['ngTable']).controller('DemoCtrl', function($scope, $filter, ngTableParams) {
...
And that throws this error: Error: [$injector:unpr] Unknown provider: ngTableProvider <- ngTable
Changing 'ngTable' to 'ngTableParams' worked. Is this what the examples should say, or am I missing something?
The text was updated successfully, but these errors were encountered: