Current behavior:
We can use the attribute ref to get a reference to an element in the view model easily.
This this element is an aurelia component, I can use myElement.au.controller.viewModel to get the corresponding view model instance.
Expected/desired behavior:
Getting child view models would be much easier if we introduce an attribute ref-vm which does the same but resolves the view model or assigns undefined if the element does not have one.
What is the motivation / use case for changing the behavior?
Getting child view models easily.
I'm submitting a feature request
Library Version: aurelia-templating-binding: 1.3.0
Operating System: Windows 10
Node Version: 6.5.0
NPM Version: 3.10.5
JSPM OR Webpack AND Version JSPM 0.16.52
Browser: all | Chrome
Language: all | TypeScript 2.3.2
Current behavior: We can use the attribute
ref
to get a reference to an element in the view model easily.This this element is an aurelia component, I can use
myElement.au.controller.viewModel
to get the corresponding view model instance.Expected/desired behavior: Getting child view models would be much easier if we introduce an attribute
ref-vm
which does the same but resolves the view model or assignsundefined
if the element does not have one.