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
Get reference to view model with compose #90
Comments
Well, you can get a hold of the compose's view model with |
Well the view model instance would be |
Did you try doing |
That should work, but I wish there was a simpler/prettier way because I have to access that more than once, and that's just an example, I actually have to use it in one place like this |
It can't be injectible because it can dynamically change at any time if it's bound. We could add an event to the compose element that fires whenever a composition completes. |
@olanod can this be closed? This week's release eliminates the need to use $parent. |
closing- @olanod please re-open if you're still having trouble with this. |
I'm trying to use |
I have a composed view
<compose view-model="app/some/nice-view"></compose>
and I'd like to reference the inner view model form a sibling element of the compose or from the js code.I'd like to do something like this:
The text was updated successfully, but these errors were encountered: