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

observable data vs URL miss-match #135

Open
justinbmeyer opened this issue Dec 28, 2017 · 1 comment
Open

observable data vs URL miss-match #135

justinbmeyer opened this issue Dec 28, 2017 · 1 comment

Comments

@justinbmeyer
Copy link
Contributor

Say on an empty hash (`window.location.hash = ""), the following runs:

var state = new DefineMap({count: 0});
route.data = state;
route.start()

What should the hash and state.count be after? Currently, on start we `assign(route.data, deparam(url) ). This leaves:

hash            //-> ""
state.count //->0

I think this is wrong. Either it should be:

hash            //-> ""
state.count //-> undefined
hash            //-> "#!count=0"
state.count //-> 0
@justinbmeyer
Copy link
Contributor Author

This issue: canjs/canjs#979 is the source of some of this weirdness. It lends itself to making the hash:

hash            //-> "#!count=0"
state.count //-> 0

I will make this this happens.

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

No branches or pull requests

1 participant