Can-stache-bindings with can-import issue


#1

HI everybody,

I have a problem with a progressive loading using can-import in a stache template.
The {^to-parent} live binding don’t works (the other binding, like the two-way, work correcly).

Here is the situation:

// inside a context I cannot bind the name prop of the child mycomponent
<can-import from="component/mycomponent/mycomponent"> <my-component {^name}="componentName" ></my-component> </can-import>

the name prop is declared inside the mycomponent viewModel also with a default value.

Any idea?

Note: if using the import/require method in the module ( import "component/mycomponent/mycomponent" instead of the <can-import from... > ), instead it works.

Thanks a lot.


#2

You might need {^name}="../componentName" to skip over the scope of the can-import.

{^name}="componentName" is probably trying to set componentName on the promise provided by <can-import>


#3

Thank you! It is correct! Awesome