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

Changing route.data does not bind new observable to the url #153

Open
matthewp opened this issue Feb 9, 2018 · 4 comments
Open

Changing route.data does not bind new observable to the url #153

matthewp opened this issue Feb 9, 2018 · 4 comments
Labels

Comments

@matthewp
Copy link
Contributor

matthewp commented Feb 9, 2018

If we do:

route.register('{prop}');

route.data = new Thing();
route.start();

route.data = new Thing();
route.start();

route.data.prop = 'foo';

The URL will not reflect. There are a couple of ways to possible fix this:

  1. If route.start() has already been called, setting route.data should teardown and bind to the new observable. In this case, the second start() call above wouldn't happen.
  2. Create a route.stop() that does teardown. This puts it on the user to keep track of if they've already called start() though.

What do you think? cc @justinbmeyer @phillipskevin

@matthewp matthewp added the bug label Feb 9, 2018
@matthewp
Copy link
Contributor Author

matthewp commented Feb 9, 2018

#111

@chasenlehara
Copy link
Member

@matthewp Can this be closed now that 4.1.0 has been released?

@matthewp
Copy link
Contributor Author

matthewp commented Mar 5, 2018

No, this wasn't done, I only did the route.stop() part.

@matthewp
Copy link
Contributor Author

matthewp commented Mar 5, 2018

Although I have no immediate intention of doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants