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.
consul/ui-v2/app/helpers/is-href.js

14 lines
367 B

import Helper from '@ember/component/helper';
import { inject as service } from '@ember/service';
import { observer } from '@ember/object';
export default Helper.extend({
router: service('router'),
compute(params) {
return this.get('router').isActive(...params);
},
onURLChange: observer('router.currentURL', function() {
this.recompute();
}),
});