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

Make component late binding work with the scope if there was one. #290

Open
justinbmeyer opened this issue Aug 6, 2018 · 0 comments
Open
Assignees

Comments

@justinbmeyer
Copy link
Contributor

This is very likely a problem that should be fixed in both stache and can-view-callbacks. But in a training, someone was progressively loading a component that was already written to the page.

This would throw an error about the scope in scope.computeData() not being defined.

This warning isn't helpful. But I also think we should support it. Ideally, when stache finds a custom element, it can register a listener of sorts for if that element becomes defined:

viewCallbacks.onTag("todo-list", function(el, scopeData){
 ....
})

This way, if the component becomes defined, it can instantiate itself with stache's scope.

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

2 participants