I have these routes in my Ember.js app:
router.js
EmberRails.Router.map(function() {
this.resource('stories', function () {
this.resource('story', {path: '/:story_id'});
});
});
And this is what my Ember Inspector outputs in the routes tab:
Now, in the "Template" column (second from right), Ember tells me where it expects the templates should be for the different Story
resources. As you can see, it wants certain templates directly in the /templates
directory, and some in /templates/stories
. I can see no reason for this and personally I find it confusing and ridiculous.
Is there any way in Ember to use a Rails-style convention, like this:
Show ('story') - /templates/stories/show
Index - /templates/stories/index
Edit - /templates/stories/edit
etc..
Aucun commentaire:
Enregistrer un commentaire