Skip to content

Instantly share code, notes, and snippets.

@johanobergman
Last active September 29, 2015 22:37
Show Gist options
  • Select an option

  • Save johanobergman/60483a8f49c30f245eef to your computer and use it in GitHub Desktop.

Select an option

Save johanobergman/60483a8f49c30f245eef to your computer and use it in GitHub Desktop.
Sections in Ember.js components.
<h1>Hello from the index page!</h1>
{{#my-component parent=controller}}
{{#section 'header'}}
<h2>Header inside my awesome component.</h2>
{{/section}}
<p>
Here goes the main body that fits into the standard "yield" helper.
That's because I'm not in a section.
<p>
{{#section 'footer'}}
<p>Copyright FooCompany
{{/section}}
{{/my-component}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment