Closed mrcel closed 9 years ago
Try {{desserts.length}}
My example: md-total="{{items._size}}"
{{desserts.length}} works for me! Thank you! Do you know if .length works as a method to get the size of desserts? Or is it a variable? Best, Marcel
In my case, I had to change the routine of example, and I use an api with HAL, is called restheart.It depends largely on the api and routine that you apply your resources.
In your case you keep the sample intact?
@mrcel length
is a built in array property that returns the length of an array. I'm not sure how it is implemented in the language but I believe it is just a variable that is maintained as things are added / removed.
[1, 2, 3].length === 3 // true
Because I am filtering results on the server the length of my array is not the same as the total number of items in the table, I define a property called count that is the total number of items in the database.
My md-data-table is running almost perfectly. Unfortunately, it is not possible to go back and forth in the pagination. Switching from 5 to 10 or even 15 elements per page is not a problem. And also the number of all elements is not displayed:
Does it have anything to do with {{desserts.count}}? Where is the issue? Thank you!