Comments (3)
Are you trying to achieve pagination on the server side or client side? As long a $digest
is performed when new data is pushed from Socket.io to the client I believe ng-repeat
should be able to handle that just fine.
I think the problem might be that you are not actually implementing the pagination. Simply assigning values to the attributes on the md-data-table-pagination
directive will not enable pagination. The easiest way to do pagination is in the client using the built in pipe functionality of ng-repeat
. For example,
<tr ng-repeat="item in array | orderBy: myOrder | filter: mySkip | limitTo: myLimit">
You can implement a simple skip function in your controller like so,
$scope.mySkip = function (item, index) {
return index >= ($scope.myLimit * ($scope.myPage - 1));
};
The demo provided takes advantage of ng-repeat
to do client-side pagination.
Your english is better than some people I know who speak it natively :)
from md-data-table.
Thank you ! completely forget about ng-repeat filters ...sometimes just have to see bigger lol, in a complement way you can point this on documentation maybe can help people who is starting with angular like me 😃
from md-data-table.
I'm happy you got it working! I can provide this code in the documentation for pagination.
from md-data-table.
Related Issues (20)
- Global setting
- How to select all rows? HOT 8
- Exclude certain rows from sorting
- Please bump version and publish to npm
- Custom cell disable using value - Md-data-table - AngularJS
- Sorting when using md-virtual-repeat and md-on-demand
- how can i have a fixed header when using md-vritual-repeat-conatiner
- Missing rows with mdVirtualRepeat
- Sticky column HOT 2
- Multiple parameter ordering HOT 1
- Refresh data table after edit, add, update.
- $mdEditDialog large throws an error while calling $http service on save.
- how to print md data table without order by arrow icon HOT 1
- Pagination localisation options are insufficient
- Live Demo has security breach (Kinda) HOT 3
- maintain sorting state in and out of session
- md-table-pagination not working for server side binding(other than page 1) HOT 1
- Selectable Columns Callback is not working
- Get limited data from server rather binding all data
- Bring md-select selected from server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from md-data-table.