Comments (10)
I would load maybe 2-3 pages then background load a few more.
from angular-wp-front-end.
@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.
good call, can do that
from angular-wp-front-end.
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.
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.
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.
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.
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.
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.
Closing for now, please re-open if not satisfied
from angular-wp-front-end.
Related Issues (19)
- Routes For Pages
- Move config to its own file, probably gitignored HOT 1
- Escape text in post titles
- Pull image styles in from WordPress
- Author archives
- When reloading page pagination still runs and grab page 2, etc.
- Update post factory so it can do all the types of queries
- Make blog index look like a blog index
- Button for offline reading of post
- Show featured image in single post view
- Local Storage schema and factory refactor HOT 1
- Set cache manifest header
- Controller for Caldera Forms
- Menu Controller HOT 1
- SEO fields in header
- Category Term Archives HOT 3
- Single Post View
- Tag Term Archives
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 angular-wp-front-end.