Hi,
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 (Ember.js - Deprecations), when I ran the route unit tests.
- Issue calling a router refresh
this.get(‘router’).refresh(), gives:
undefined is not a constructor (evaluating ‘route.get(‘router’).refresh()’)
this.router.refresh:
undefined is not an object (evaluating ‘this.router._routerMicrolib.refresh’)
- Issue calling route.get(‘router’).transitionTo
route.transitionTo:
undefined is not an object (evaluating ‘this.router._routerMicrolib.get’)
route.get(‘router’).transitionTo:
undefined is not a constructor (evaluating ‘route.get(‘router’).refresh()’)
- 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