Ember transitionTo query params not updating url

I am using Ember 1.9.1 and have a problem navigating to a route with query parameters.

queryParams do not appear in the url.

I got http: // localhost: 8080 / login instead of 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') } }); } 
+5
source share
1 answer

You need to specify queryParams and uuid , email in LoginController :

 App.LoginController = Ember.Controller.extend({ queryParams: ['uuid', 'email'], uuid: null, email: null }); 

Working demonstration.

http://emberjs.jsbin.com/zacagazuwi/1#/login?email=test%40gmail.com&uuid=myuuid

+5
source

All Articles