github.com/outbrain/consul@v1.4.5/ui-v2/app/helpers/is-href.js (about)

     1  import Helper from '@ember/component/helper';
     2  import { inject as service } from '@ember/service';
     3  import { observer } from '@ember/object';
     4  
     5  export default Helper.extend({
     6    router: service('router'),
     7    compute(params) {
     8      return this.get('router').isActive(...params);
     9    },
    10    onURLChange: observer('router.currentURL', function() {
    11      this.recompute();
    12    }),
    13  });