framework
framework copied to clipboard
question: How can I redirect after a get (login) request ?
I'm getting the token like this:
getToken(){
return this.http.get(this.url).then(response => {
var result = JSON.parse(response.response)
console.log(response);
// I persist the token
// Here I'd like to navigate to another page
}).catch(err =>{
console.log(err);
alert(JSON.parse(err.response).error);
});
}
I read the doc on aurelia.io from beginning to end and the only interesting this about this was Redirect but I don't really understand how to use it ?
Ok so I found a few example apps and used:
this.router.navigate('another_route');
Hello Clarisse, great that you found your answer. I'd welcome you to join our gitter channel where those kind of questions get solved pretty quickly