Reputation: 3165
I'm building an Ember app that contains all necessary data internally, and doesn't make any writes to a database. I'm currently storing my data in a route as an array of POJOs, but this obviously isn't sustainable once a second page is added and needs access to the same data.
Where is the canonical place to store data in a REST-less, no-writing Ember app? Does it still even make sense to use Ember Data for such a thing?
Upvotes: 0
Views: 33
Reputation: 3165
It turns out Ember has a services concept!
Long lived data can simply live within a service, which you can then use dependency injection to access from anywhere. See this blog post for more details on services and dependency injection: http://www.hutchinson.io/ember-services-and-dependency-injection/
Credit goes to alexspeller in #emberjs on irc.freenode.net for the answer
Upvotes: 1