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

ViewModels are being patched, not re-created #2

Open
niieani opened this issue Dec 1, 2016 · 1 comment
Open

ViewModels are being patched, not re-created #2

niieani opened this issue Dec 1, 2016 · 1 comment

Comments

@niieani
Copy link
Contributor

niieani commented Dec 1, 2016

Currently, we only switch out the prototype of the ViewModels, from the old ones to the new ones. It would be best if we could re-create them and then copy their state over to the new object. This also creates problems of its own, because we'll need to de-register old instances in the DI Containers and re-register new ones in their places. That will be quite challenging, since Containers do not expose any such capabilities.

A possible solution would be to add a "proxy" feature to Aurelia DI, so that, if enabled, resolved instances could be globally overwritable with a user-defined proxy function.

@Alexander-Taran
Copy link

Stale since 2016

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

No branches or pull requests

2 participants