Closed klinki closed 3 years ago
Hi @klinki, thanks for opening this issue. I'm the creator of this plugin. I'm very proud, that this plugin can help you. It's a long time ago, that I used Durandal or Knockout by myself, but I think I can find some time in the next days to investigate and maybe find a fix for this.
The fix is included in 2.4.1 All changes: https://github.com/aurelia-contrib/aurelia-knockout/compare/2.4.0...2.4.1
Wow, that was super quick! Thank you!
Hello,
I'm porting old project from durandal to aurelia and I'm using your excellent plugin. I'd like to thank you for creating it, it saved me a lot of time.
Unfortunatelly I discovered a problem with combination of
with:
andcompose:
expressions. When these two are combined,$root
scope is lost and cannot be used anymore.Here is small examle how to reproduce that issue:
Component:
View:
inner-view.html:
or full example on https://codesandbox.io/s/optimistic-leftpad-qjvgm?file=/index.html
I did some debugging with knockoutJS Context debugger Chrome extension (https://chrome.google.com/webstore/detail/knockoutjs-context-debugg/oddcpmchholgcjgjdnfjmildmlielhof) and I found out it correcly saves the $parent scope when
with:
expression is used, but withcompose:
it doesn't.