I am using Ember-simple-auth
to authenticate my routes, and is working fine. I have:
login - login route
index - after login in ok
And i'm using the ember-cli-notification to pop up this message:
"Welcome USER NAME"
Like this, in IndexController:
export default Ember.Controller.extend({
init () {
this.notifications.addNotification({
message: 'Welcome USER NAME',
type: 'success',
autoClear: true,
clearDuration: 5000
});
}
});
I would like to ask... how can i access the properties of the current logged user? I'm in a complete different controller, so i don't have any idea in how can i do that...
And.. i would like to ask if possible.. i am using the init function for this.. am i doing it right?
Thanks.
Aucun commentaire:
Enregistrer un commentaire