Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #2808 from scalvert/rename-router
Browse files Browse the repository at this point in the history
Updating docs based on rename of routerMicrolib to _routerMicrolib
  • Loading branch information
rwjblue authored Feb 14, 2017
2 parents 37b81f3 + becff0f commit a60aa14
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/deprecations/v2.x.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -878,15 +878,15 @@ klass.hasSpeed('slow'); // true
### Deprecations Added in 2.13
#### Ember.Router.router renamed to Ember.Router.routerMicrolib
#### Ember.Router.router renamed to Ember.Router._routerMicrolib
##### until: 2.16.0
##### id: ember-router.router
The private `router` property of the `Ember.Router` instance (commonly found as this.router in Ember.Route instances or via router:main in the container)
has been renamed to `routerMicrolib` to disambiguate it from `router.js`, the microlib used within `Ember.Router`.
The private `router` property of the `Ember.Router` instance (commonly found as `this.router` in `Ember.Route` instances or via router:main in the container)
has been renamed to `_routerMicrolib` to identify it as `router.js`, the microlib used within `Ember.Router`.
Addon and application developers that are using the internal `router` property of `Ember.Router` should replace those usages with `Ember.Router.routerMicrolib`.
Addon and application developers that are using the internal `router` property of `Ember.Router` should replace those usages with `Ember.Router._routerMicrolib`.
This example demonstrates a common use case for `.router`.
Expand All @@ -911,7 +911,7 @@ After:
export default Ember.Service.extend({
getRouteNameFromUrl (url) {
const router = getContainer(this).lookup('router:main');
const routes = router.routerMicrolib.recognizer.recognize(url);
const routes = router._routerMicrolib.recognizer.recognize(url);

if (routes && routes.length) {
return routes[routes.length-1].handler;
Expand Down

0 comments on commit a60aa14

Please sign in to comment.