mercredi 21 janvier 2015

Ember query param is null

I'm trying to get a param from the URL, but it appears it doesn't get assigned at all. I was following this guide http://ift.tt/1h67k3m Below is the index.js controller.



export default Ember.Controller.extend({

queryParams: ['authToken'],
authToken: null,

init: function() {
var authToken = this.authToken;
console.log(authToken);
}
});


When accessing the root URL / or /#, authToken is null, which works as expected. However, when trying out /#?authToken=123, it's still null. Any ideas ?





Aucun commentaire:

Enregistrer un commentaire