You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any entity list view throws the error Unknown provider: totalItemsProvider <- totalItems <- ListController (only code in the project is below).
var admin = nga.application('My First Admin')
.baseApiUrl('http://jsonplaceholder.typicode.com/'); // main API endpoint
// create a user entity
// the API endpoint for this entity will be 'http://jsonplaceholder.typicode.com/users/:id
var user = nga.entity('users');
// set the fields of the user entity list view
user.listView().fields([
nga.field('name'),
nga.field('username'),
nga.field('email')
]);
// add the user entity to the admin application
admin.addEntity(user);
// attach the admin application to the DOM and execute it
nga.configure(admin);
Steps to Reproduce
Unfortunately I can't get the error to reproduce in plunkr because I don't know if its related to webpack or an angular version problem with this library.
I'm posting here so that I hope someone sees this and has come across this before.
Doing some digging....
I assume it comes from this controller function ListController($scope, $stateParams, $location, $anchorScroll, ReadQueries, progression, view, dataStore, totalItems).
The only place I can find a totalItems resolver is here inside of ReadQueries:
You are right, the totalItems "provider" is defined in the routing.
I don't know if it is related to the wepack build, but it seems that the response argument doesn't have a totalItems attribute.
Can you provide a way to reproduce the issue ? How do you import ng-admin ? What is your webpack configuration ?
To help you find the issue, you can install ng-admin locally and use it as a dependency for your project:
Install ng-admin locally and make it available for link
git clone [email protected]:marmelab/ng-admin.git
cd ng-admin
make install && make transpile
npm link
Use your local ng-admin to debug your project
npm link ng-admin
From here, your node_modules/ng-admin folder will be a symbolic link to your ng-admin fork and you'll can console.log or whatever you want. Don't forget to transpile after each change.
Scope
If you have a usage question, please ask on StackOverflow or Gitter (live chat)
This form is for reporting bugs in or adding enhancements to
ng-admin
.Prerequisites
ng-admin
? Yes - 1.0.6Description
Version: 1.0.6
Angular: 1.6.x and 1.5.x
Any entity list view throws the error Unknown provider: totalItemsProvider <- totalItems <- ListController (only code in the project is below).
Steps to Reproduce
Unfortunately I can't get the error to reproduce in plunkr because I don't know if its related to webpack or an angular version problem with this library.
I'm posting here so that I hope someone sees this and has come across this before.
Doing some digging....
I assume it comes from this controller
function ListController($scope, $stateParams, $location, $anchorScroll, ReadQueries, progression, view, dataStore, totalItems)
.The only place I can find a totalItems resolver is here inside of ReadQueries:
and here inside of routing.js
If I put a breakpoint on either one, it never gets hit and the error gets thrown before.
Do we have any example apps of angular 1.5.x or 1.6.x using latest webpack? Maybe I'm missing something there.
The text was updated successfully, but these errors were encountered: