I often used routes with the path '/'
to specify them as the default route. Now I noticed that it didnt work as expected with the link-to helper.
I used this in an older version of emberjs and I think it worked.
So when I have a language
route with a dynamic segment which contains a courceCategories
route that has the path '/'
and use the {{#link-to "language" model}}click{{/link-to}}
helper I get the following error:
Assertion failed: The attempt to link-to route 'language' failed (also tried 'language.index'). The router did not find 'language' in its possible routes: 'loading', 'error', 'languages', 'language.loading', 'language.error', 'language.courceCategories', 'index'
Why cant the router resolve this url?
demonstration: http://emberjs.jsbin.com/umeFeBe/2/edit
Thanks
That's because you're overriding the language.index
value when you do the route /
path inside its function. You now need to link to language.courceCategories
<script type="text/x-handlebars" data-template-name="languages">
{{#each this}}
{{#link-to "language.courceCategories" this}}{{id}}{{/link-to}}
{{/each}}
</script>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.