Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX beta] Rename private property Route#router to Router#_router #16312

Merged

Commits on Mar 19, 2018

  1. Rename private property Route#router to Router#_router

    The fact that this private property was named router was preventing user
    from injecting the router service into routes like this:
    
    ```js
    export default Route.extend({
      router: service()
    });
    ```
    
    I consider that the above code is pretty reasonable, and it should be
    the private property the one that should be renamed to a clearer `_router`
    name that is less likely to collide with user-defined properties or methods.
    
    If you deem this an _intimate_ API we could consider adding a deprecated
    alias, but I don't have evidence to consider it such, as `router` is too
    common of a term to search for in emberobserver.
    cibernox committed Mar 19, 2018
    Configuration menu
    Copy the full SHA
    4690f63 View commit details
    Browse the repository at this point in the history