I'm using Ember 1.9.1 and having an issue when transitioning to a route with query params.
The queryParams
don't appear in the url.
I got http://localhost:8080/login instead of having http://localhost:8080/login?email=myemail&uuid=myuuid
App.MyRouteRoute = Ember.route.extend({
redirect: function (model, transition) {
this.transitionTo('login', {
queryParams: {
uuid: model.get('uuid'),
email: model.get('email')
}
});
}
You need to specify queryParams
and uuid
, email
in LoginController
:
App.LoginController = Ember.Controller.extend({
queryParams: ['uuid', 'email'],
uuid: null,
email: null
});
Working demo.
http://emberjs.jsbin.com/zacagazuwi/1#/login?email=test%40gmail.com&uuid=myuuid
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With