Skip to content

Instantly share code, notes, and snippets.

@dburles
Created July 29, 2014 14:35
Show Gist options
  • Save dburles/a76ffd14992daf636f6c to your computer and use it in GitHub Desktop.
Save dburles/a76ffd14992daf636f6c to your computer and use it in GitHub Desktop.
GroupOneController = RouteController.extend({
activeTab: 'groupOne',
// ...
});
PageController = GroupOneController.extend({
// inherits 'activeTab'
// ...
});
UI.registerHelper('activeTab', function(name) {
if (Router.current() && Router.current().activeTab === name)
return 'active';
});
<button class="{{activeTab 'groupOne'}}">Group One</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment