Skip to content

Instantly share code, notes, and snippets.

@jrhe
Last active August 29, 2015 14:14
Show Gist options
  • Save jrhe/a19f92bc48e70308539e to your computer and use it in GitHub Desktop.
Save jrhe/a19f92bc48e70308539e to your computer and use it in GitHub Desktop.
export default Ember.Component.extend({
selectedTabIndex: 0,
...
}
...
{{#dc-tabs selected-index=selectedTabIndex}}
{{#dc-tab-list}}
<div class="view-toggle">
<div>
{{#each view in document.views}}
{{#dc-tab}}
<button class="toggle-fragment">
<span>{{view.name}}</span>
</button>
{{/dc-tab}}
{{/each}}
</div>
</div>
{{/dc-tab-list}}
<div class="document-container">
{{#each viewModel in document.views}}
{{#dc-tab-panel}}
{{render-component viewModel.type viewModel=viewModel}}
{{/dc-tab-panel}}
{{/each}}
</div>
{{/dc-tabs}}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment