-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Pagination when the endpoint is not standard. #148
Comments
Something like this should work:
You'll need to do some extra setting up the case when there's less that 5 pages left on the server, but that should be pretty simple! |
import Ember from 'ember'; const { service } = Ember.inject; export default Ember.Route.extend(InfinityRoute,{ fakeSignup:service('fake-session'), model(){ afterInfinityModel(feed) { @hhff I tried what you told above.The first made to server is http://www.example.com/api/photos/feed/?end=5&page=1&per_page=25&start=0 Though I am getting the data from the server side.But when I scroll down just "loading infinite model" text is displayed and no api is being called. |
Hey I tried it but it working for first call.after scroll it doesn't load any Thanks On Mon, Mar 21, 2016 at 9:04 PM, Hugh Francis [email protected]
|
@nandanself your code is not formatted. Very hard to read. |
@nandanself - that is most likely due to the |
I am using your ember-infinty addon in my ember app.The problem I am facing is that my pagination endpoint in the backend is not standard.
Pagination api
http://example.com/api/feed/?start=0&end=5;
Now I can change the value of start and end when api call and get the result.Is there a way by which I can use ember-infinity in this case.If yes please tell me how.If not tell me how to write pagination for this case ( may be a tutorial or two ).Thanks in advance.Also if I am able to do this.I am computing the feed using Ember.computed and making some changes in feed data.So how do I recomputed the feed in controller whenever model changes ?
The text was updated successfully, but these errors were encountered: