I have a problem. I have a news model in my background application and my Emberjs app. And there are a lot of news posts can be stored, so I have to divide loading them to some pages or whatever. The problem is - I need to always get a full count of not readed news posts. What is the best way to implement such behaviour in my Ember application?
Asked
Active
Viewed 616 times
1 Answers
3
If you are using Ember Data, I would take a look at Handling Metadata.
The default JSON deserializer looks for a property named meta
which could contain something like "totalUnreadPosts": 10
You could get to the metadata with var metaData = store.metaDataFor('newsPost');
which would allow you to get a count without having to load every post.

Sam Heuck
- 585
- 5
- 15