mercredi 22 mars 2017

How to access queryParams in ember when locationType is set to hash

I've queryParams:['qp1','qp2'] in my application controller and in the model hook I've something like below

model : function(params) {
    console.log(params.qp1);
    console.log(params.qp2);
}

Everything above is working fine if the locationType is set to auto in my environment.js file but when I set the environment to hash, both are undefined. I'm able to see the params object as

params:{
      qp1:undefined,
     qp2:undefined
}

I'm wondering why I'm able to access queryParams when the locationType is auto but not when locationType is hash




Aucun commentaire:

Enregistrer un commentaire