GithubHelp home page GithubHelp logo

Pagination about angular-wp-front-end HOT 10 CLOSED

calderawp avatar calderawp commented on August 22, 2024
Pagination

from angular-wp-front-end.

Comments (10)

DavidCramer avatar DavidCramer commented on August 22, 2024 1

I would load maybe 2-3 pages then background load a few more.

from angular-wp-front-end.

royboy789 avatar royboy789 commented on August 22, 2024

@Shelob9 do you think its better to grab ALL posts and have Angular paginate (there is a good directive / plugin for ng-paginate) or just call the API every time?

Should each "page" be unique, or should it just add to the existing page below the last

from angular-wp-front-end.

royboy789 avatar royboy789 commented on August 22, 2024

good call, can do that

from angular-wp-front-end.

Shelob9 avatar Shelob9 commented on August 22, 2024

I agree with David that getting one or two pages (and local storaging the
JSON response) in advance is smart, but getting all could be a performance
problem.

JoshPress.net http://joshpress.net/
CalderaWP.com http://calderawp.com/
IngotHQ.com
@Josh412 http://twitter.com/Josh412

On 3 May 2016 at 14:19, Roy Sivan [email protected] wrote:

good call, can do that


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1 (comment)

from angular-wp-front-end.

royboy789 avatar royboy789 commented on August 22, 2024

Getting all isn't really an issue, done it before, but only in limited capacity (A CPT with no more than like 30 posts). I like the idea of reducing HTTP calls, so 1-2 pages at a time should be fine.

what you thinking as far as UI, whole new list of posts, or just add to existing?

from angular-wp-front-end.

Shelob9 avatar Shelob9 commented on August 22, 2024

Regular pagination. Show only current page of posts, that's the sensible default, but make it flexible so its easy to add append later.

Are we local storageing the JSON responses?

from angular-wp-front-end.

royboy789 avatar royboy789 commented on August 22, 2024

wasn't planning on it. could be something we offer later. but this is "simple easy" right? don't want to add complexities in now

from angular-wp-front-end.

Shelob9 avatar Shelob9 commented on August 22, 2024

My question is are you going to have to rewrite the whole thing to add localStorage? Part of the point of all of this is it should make it easy to work offline and also if we localStorage JSON it should reduces hits to WordPress and make second page load not be blocked by an HTTP request.

from angular-wp-front-end.

royboy789 avatar royboy789 commented on August 22, 2024

Added in localStorage AND pagination. Pagination triggers new API call, adds to local storage and current scope. need to finish page variable counter. (right now page 2 is hard coded)

from angular-wp-front-end.

royboy789 avatar royboy789 commented on August 22, 2024

Closing for now, please re-open if not satisfied

from angular-wp-front-end.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.