javascript - "undefined" in the URL when transitioning to a route -
from controller i'm transitioning route this:
this.transitiontoroute("posts.dynamicfinder", app.response.find(obj));
the route looks this:
this.route("dynamicfinder", { path: ':some_id' });
everything works fine except url shows "undefined".
my guess because of :some_id
. don't have pass model (api.response.find(obj)
). if remove :some_id
can't seem pass model along ...
how can rid of "undefined"? have pass model in transitiontoroute
.
here jsbin example: http://jsbin.com/ocayoyo/41/ recreate issue, type "5" in text box , click submit
just create route custom model id implementation.
app.postsdynamicfinderroute = ember.route.extend({ serialize: function(model) { return { 'some_id': 'dynamic' }; } });
Comments
Post a Comment