Joined July 2018
·

rewritten2

Thinking
·
Barcelona
·
·
·

You can just yield a hash of components. Every time the component is null, it's not rendered:
hbs <header>{{yield (hash header=(component 'some-header-container'))}}</header> <div class="body">{{yield (hash body=(component 'some-body-container')}}</div> <footer>{{yield (hash footer=(component 'some-footer-container')}}</footer>

{{#my-comp as |section|}}
  {{#section.header}}
    My header
  {{/section.header}}
  {{#section.body}}
    My body
  {{/section.body}}
  {{#section.footer}}
    My footer
  {{/section.footer}}
{{/my-comp}}

If a bit longer, it's much cleaner.

Achievements
1 Karma
34,349 Total ProTip Views