lundi 23 mars 2015

linkto syntax for ember resource route (plural)?

I have a router



Router.map ->
@resource 'personalities', ->
@resource 'personality', { path: '/:name' }


I have a personalities.hbs template



<h2>Personalities</h2>


In my application.hbs I put in a link to go to the list of personalities



{{link-to 'personalities' this}}
{{link-to 'personalities' 'personalities'}}
{{#link-to 'personalities' this}}Personalities{{/link-to}}
{{#link-to 'personalities' 'personalities'}}Personalities{{/link-to}}


None of these work. They either break the page so that it renders with absolutely nothing, or it links to a stub path '#' or '/'


Please help! The ember.js guides don't have proper documentation for using link-to in this manner. Most blogs assume you're you have your list in your root page, not a different url that lists resources.


I'm using ember CLI 0.2.0, and is the index template actually gone, and instead replaced with the 'personalities.hbs' in my case? This is another discrepancy I see with old guides and blogs.





Aucun commentaire:

Enregistrer un commentaire