dimanche 22 novembre 2015

Ember simple auth, how to update the store without using private API?

So I've been using the updateStore method on older versions of Ember simple auth (0.7.4). The reason is that, the user might change a certain setting of the application, for example he disables fx sounds, and I'd like to save this new setting in his session data, and persist the information in localStorage, so I would call the updateStore function, after setting this.set('session.fx', false)

I know updateStore is private, so is there a better way to do this? Also, what would be the best way to get direct access to the store in ESA 1.0 ? I used to call this.get('session.store'), but it seems this does not work anymore.

Thanks.




Aucun commentaire:

Enregistrer un commentaire