I'm trying to get these questions to open in 3 columns, 1. Questions, 2. the selected question, 3. a form to edit the question.
I read this The when and why of nesting - and have tried it both ways. Could it be something specific to Twiddle? or can you spot what I'm missing?
This is the router.js
Router.map(function() {
this.route('questions', function() {
this.route('question', { path: '/:question_id' }, function() {
this.route('editor');
});
});
});
Ember twiddle seems to have a POD structure / in most ways. this is questions/template.hbs
<section class='questions'>
<h2>Questions</h2>
<ul>
{{#each model as |thisQuestion|}}
<li>
{{#link-to 'questions.question' thisQuestion}}
<h3>{{thisQuestion.title}}</h3>
{{/link-to}}
</li>
{{/each}}
</ul>
</section>
<section class='question'>
<h2>Question</h2>
{{outlet}}
</section>
Aucun commentaire:
Enregistrer un commentaire