Ghost/ghost/admin/app/utils/link-component.js
Jason Williams feac9682d0 Update Ember to 1.13.2
- Refactor to handle deprecations including removal of
  all Views, ArrayControllers, and ItemControllers.
2015-06-24 11:47:28 -05:00

16 lines
400 B
JavaScript

import Ember from 'ember';
Ember.LinkComponent.reopen({
active: Ember.computed('attrs.params', '_routing.currentState', function () {
var isActive = this._super();
Ember.set(this, 'alternateActive', isActive);
return isActive;
}),
activeClass: Ember.computed('tagName', function () {
return this.get('tagName') === 'button' ? '' : 'active';
})
});