You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
424 B
17 lines
424 B
import Ember from 'ember'; |
|
|
|
const { getOwner } = Ember; |
|
|
|
export default Ember.Component.extend({ |
|
tagName: 'li', |
|
classNameBindings: ['isActive:active:inactive'], |
|
|
|
router: function(){ |
|
return getOwner(this).lookup('router:main'); |
|
}.property(), |
|
|
|
isActive: function(){ |
|
var currentWhen = this.get('currentWhen'); |
|
return this.get('router').isActive(currentWhen); |
|
}.property('router.url', 'currentWhen') |
|
});
|
|
|