Closed Xenope closed 8 years ago
I think that <compose>
doesn't create its own binding context.
Just to be clear my compose attribute is inside a customElement, Doesn't have the customElement his own context and you won't be able to access the parent without $parent.
A custom element's template does not have access to the outer/parent scope. Composed views do have access to the outer scope. There have been some bugs related to these rules, the next release of the templating repo should address the outstanding issues.
Hello,
I'm using the compose attribute to load a remote file and bind the values to "data":
In this remote file I bind different values :
As you can see I bind two values using "data" which is the one defined in the compose tag but I'm also able to bind values to the parent view-model. It's normal when I'm using the $parent keyword but i wonder if it's normal that I can access the parent context directly by using ${usr.ctc.ctcphnpostnum} or ${ctcphnpostnum} (two var defined in my parent view-model).