-
Notifications
You must be signed in to change notification settings - Fork 4
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
Updating data in canRoute should not removed any properties on target that are not available on source #160
Comments
Needs to call update. I think session should be serialize: false |
Needs to call update because if stateful properties in the url are removed when the url changes, they need to be removed from the view model. |
Got it. That worked. So what I think is a little wonky about this is:
I think we should pick on and opt in. And in this case, I think that I am specifying a property in My preferred approach would be so:
then:
|
You can use “*”: {serialize: false} To change the defaults. I like the idea of making props identified by register as serialize:true no matter what. I’m not sure what to do about point number 2. How should we know which props are part of the url and which aren’t if we support urls like /foo/bar?zed=ted ? |
We could show to use serialize:false trick to teach people how to opt in. |
Another way would be to mount to route data to a property within your app vm. This way everything on that will be serialize true. This might be a better idea. |
closing for #170 |
In a donejs application is you have an
app.js
file that looks like:In the console, run
can.viewModel('html').session = {}
. The expectation is thatpage
would then be equal tofoo
.It does not, because https://github.com/canjs/can-route/blob/master/can-route.js#L94 is calling
canReflect.update
where I think it should be callingcanReflect.assign
.The text was updated successfully, but these errors were encountered: