I have a route /changepassword
and I need to add to it 2 params: iduser
and resetcode
. To look like this: /changepassword?iduser=123&resetcode=foo
I read other things related to this (1, 2) but I couldn't figure this out. I don't have any experience in ember and I was ask to do some modifications where I work. We are using ember 1.5.1
I tried this but it's throwing me this: Uncaught Error: Assertion Failed: Error: Assertion Failed: The URL '/changepassword?test1=aaasd' did not match any routes in your application
[EDIT]
Thanks to @GJK, I know that what I need is query params, no path params.
Now, my code looks like this:
Routes:
module.exports = App.Router.map ->
...
...
@resource('change_password', path: '/changepassword')
Controller:
module.exports = App.ChangePasswordController = Ember.Controller.extend
needs: ['config', 'viewport', 'application']
queryParams: ['test']
test: null
...
...
But, when I access http://localhost:3333/#/changepassword?test=foo is transitioning to: http://localhost:3333/#/changepassword
[OLD]
This are my routes:
module.exports = App.Router.map ->
@resource 'index', path: '/', ->
@resource('account_sign_up', path: '/signup')
@resource('unsubscribe', path: '/unsubscribe')
@resource('change_password', path: '/changepassword/:test1/:test2')
Any help? Thanks!