javascript - How can I access controllers in EmberJS from different classes (like authenticators)? -


i'm using app generated using ember-cli simple-auth , need access controllers authenticator.

you don't want pass logged in user data controller. chances user data used in multiple routes/controllers, need globally available object (ember services can solve use case). luckily handled ember simple auth in session object, want store user data.

in controller should able like:

this.get('session.secure.email'); // version 0.8.x 

read session here: https://github.com/simplabs/ember-simple-auth#the-session want work with.


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -