lundi 28 septembre 2015

Ember 2, ember-cli, render partial to only show categories title, but it doesn't work

I have normal, basic ember-cli project.

This is my application.hbs:

<div class="container-fluid">

    <div class="row">

    <div class="col-sm-3 col-md-2 sidebar">
      {{render 'sidebar'}}
    </div>

    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">

        {{outlet}}

      </div>

    </div>

</div>

This is my post.hbs:

{{#each model as |post|}}
    {{post.text}}
{{/each}}

This is my sidebar.hbs:

<ul class="nav nav-sidebar">
  {{#each model.posts as |post|}}
    <li>{{#link-to author}}{{post.author.name}}{{/link-to}}</li>
  {{/each}}
</ul>

and everything else is standard.

How to make work {{render 'sidebar'}} with just the title of my categories?

Now it shows nothing.




Aucun commentaire:

Enregistrer un commentaire