At the moment i'm facing the problem that I need to use the invalidateSession() action from ember-simple-auth (https://github.com/simplabs/ember-simple-auth/) in one of my own controllers.
I normally use it like they do in their examples: {{ action 'invalidateSession' }}
in my handlebars-template. I need to do some preLogout
stuff before I call invalidateSession()
so there needs to be a way - but at the moment I can't figure it out how.
Template:
{{ action 'preLogout' target='view' }}
View:
actions:{
preLogout:function(){
this.get("controller").send("preLogout");
}
}
Controller:
actions:{
preLogout: function(){
var self = this;
//some preLogout things to do
//INVALIDATESESSION - how?
this.transitionToRoute("index");
}
Thanks