bugzilla-ember
bugzilla-ember copied to clipboard
Have run into an issue while working on choosing product/component that ...
...I could use help on.
Here's my route:
this.resource("browse", function(){ this.route("product", {path: ":product/:component"}); });
Here's the relevant part of the template:
{{#linkTo 'browse.product' product.name component}}{{component}}{{/linkTo}}
Here's the error I'm getting:
"Uncaught More context objects were passed than there are dynamic segments for the route: browse.product""
Also, a style question, do you want each controller/route related to browsing to be in a different file?
This is a known deficiency with linkTo right now. You have to pass models, not params to it. @machty is working on it.
You should also be passing product
not product.name
K. What's the definition of 'models'?
So, does this mean should I just use an action, then?
On Fri, Jun 28, 2013 at 11:38 AM, Erik Bryn [email protected]:
This is a known deficiency with linkTo right now. You have to pass models, not params to it. @machty https://github.com/machty is working on it.
— Reply to this email directly or view it on GitHubhttps://github.com/ebryn/bugzilla-ember/pull/13#issuecomment-20206395 .
Like a model object. You could workaround this issue by using actions.
Sorry, my question about model was too vague. Does a component, which is an attribute on the product model, count as a model? Cause we also have to pass the component.
On Fri, Jun 28, 2013 at 12:12 PM, Erik Bryn [email protected]:
Like a model object. You could workaround this issue by using actions.
— Reply to this email directly or view it on GitHubhttps://github.com/ebryn/bugzilla-ember/pull/13#issuecomment-20208310 .
Models, as in objects that you would return from the model hook of the router.