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] {{link-to}} before application boot #11522

Merged
merged 1 commit into from
Jun 21, 2015

Commits on Jun 20, 2015

  1. [BUGFIX beta] {{link-to}} before application boot

    Previously, {{link-to}} would work even if the application had not been
    booted completely. This behavior is relied on by test harnesses like
    ember-qunit, since an “integration test” of a component may include a
    template that uses {{link-to}}. Many people have discovered that they
    would like to test a component that has a link without booting the
    entire app.
    
    > You wanted a banana but what you got was a gorilla holding the banana
    > and the entire jungle. –Joe Armstrong
    
    During the Glimmer work, we refactored the interface between the
    LinkComponent and the router into a service. Unfortunately, this
    caused a regression where rendering the link before the router was
    completely initialized would raise an exception.
    
    This commit adds a very stupid guard to ensure that we have enough
    router state to determine if a link is active or not. This whole path
    could be significantly cleaned up, and in particular, we should move
    towards using a stubbed routing service in tests that encapsulates all
    of these concerns.
    tomdale committed Jun 20, 2015
    Configuration menu
    Copy the full SHA
    c9dbecb View commit details
    Browse the repository at this point in the history