Ember router 2.13 deprecation related to _routerMicrolib issue


I am an Ember newbie. Working on migration of project from Ember 2.11 to 2.15.

After migrating from 2.12 to 2.13, I am running into this issue related to a deprecation of router renamed to _routerMicrolib (https://emberjs.com/deprecations/v2.x/#toc_ember-router-router-renamed-to-ember-router-_routermicrolib), when I ran the route unit tests.

  1. Issue calling a router refresh

this.get(‘router’).refresh(), gives:

undefined is not a constructor (evaluating ‘route.get(‘router’).refresh()’)


undefined is not an object (evaluating ‘this.router._routerMicrolib.refresh’)

  1. Issue calling route.get(‘router’).transitionTo


undefined is not an object (evaluating ‘this.router._routerMicrolib.get’)


undefined is not a constructor (evaluating ‘route.get(‘router’).refresh()’)

  1. Issue calling this.router.send(‘somemessage’)

undefined is not an object (evaluating ‘(_routerMicrolib4 = this._routerMicrolib).trigger’)

Anyone has an idea how to call refresh, and get in these scenarios?

Update: The above lines are called under actions example as:

export default Base.extend({ init(){ …} actions: { refreshRoute(){ this.refresh(); //this.get(‘router’).refresh(); } } });

Where Base extends Ember.Route