Skip to content

Instantly share code, notes, and snippets.

@benbabics
Created December 22, 2016 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benbabics/da1b7b2c6f0f50363d3df5e0fc5cc370 to your computer and use it in GitHub Desktop.
Save benbabics/da1b7b2c6f0f50363d3df5e0fc5cc370 to your computer and use it in GitHub Desktop.
<header>
<h2>{{yield "title"}}</h2>
<p>{{yield "subtitle"}}</p>
</header>
{{!-- This is what I have to do to make it work --}}
{{#header-page as |section|}}
{{if (eq section "title") "My Title"}}
{{if (eq section "subtitle") "Lorem ipsum..."}}
{{/header-page}}
{{!-- This is what I'd like to do --}}
{{#header-page as |section|}}
{{section.title "My Title"}}
{{section.subtitle "Lorem ipsum..."}}
{{/header-page}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment