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

Adding deprecation information for the rename of Ember.Router.router #2806

Merged
merged 3 commits into from
Feb 13, 2017

Conversation

scalvert
Copy link
Contributor

@scalvert scalvert commented Feb 9, 2017

This PR adds information related to the rename of EmberRouter.router to EmberRouter.routerMicrolib and the associated deprecation.

Related PRs:
emberjs/ember.js#14919

Reviewers
@rwjblue @locks

Changes:

  • Added information and examples for guidance on the rename

##### until: 2.16.0
##### id: ember-router.router

The `router` property of `EmberRouter` has been renamed to `routerMicrolib` to disambiguate it from `router.js`, the microlib used within `EmberRouter`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you slightly rephrase to:

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......


The `router` property of `EmberRouter` has been renamed to `routerMicrolib` to disambiguate it from `router.js`, the microlib used within `EmberRouter`.

Addon and application developers that are using the internal `router` property of `EmberRouter` should replace those usages with `EmberRouter.routerMicrolib`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use Ember.Router instead of EmberRouter throughout...


Addon and application developers that are using the internal `router` property of `EmberRouter` should replace those usages with `EmberRouter.routerMicrolib`.

This example demonstrates a common use case for `EmberRouter.router`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets just say .router here (e.g. not EmberRouter.router, but just "the .router property).


Before:

``` javascript
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no space after the backticks

Before:

``` javascript
Ember.Service.extend({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets say export default Ember.Service.extend({


After:

``` javascript
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no space after backticks

After:

``` javascript
Ember.Service.extend({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export default Ember.Service.extend({

@scalvert scalvert changed the title Adding deprecation information for the rename of EmberRouter.router Adding deprecation information for the rename of Ember.Router.router Feb 13, 2017
@rwjblue rwjblue merged commit 37b81f3 into emberjs:master Feb 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants