You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coming from Durandal, dynamic composition allowed a view model instance to be passed directly to the compose binding and the view would be determined dynamically based on the type of view model.
It seems this approach is not supported in Aurelia, instead you bind to a model and specify the type of view model that the compose Custom Element should create to wrap (as it is passed to activate) that model.
Is my understanding correct?
If it is, what were the reasons for not including this ability in Aurelia?
Assuming my understanding is correct, it might be worth adding a note to the docs for Durandal users to explicitly state this difference. I'd be happy to contribute this, but would like to know the reasons its not included first.
The text was updated successfully, but these errors were encountered:
We intend to have this in Aurelia. The problem lies mostly with the way that the ES6 Module Loader spec is written. With Durandal, we were based on require.js and were able to plug in and do a little magic that enabled these dynamic scenarios. With the ES6 loader....things are locked up a bit tighter. However, there are some additions to the spec which would enable us to make this work in the future. I'm not sure when those will land, but when they do, we will fix this up.
So, in short, it's going to work, but at the moment it doesn't due to a spec-related issue. We have another issue that is tracking this, but I'll leave this open too since it's a bit clearer here.
Coming from Durandal, dynamic composition allowed a view model instance to be passed directly to the compose binding and the view would be determined dynamically based on the type of view model.
It seems this approach is not supported in Aurelia, instead you bind to a model and specify the type of view model that the compose Custom Element should create to wrap (as it is passed to activate) that model.
Is my understanding correct?
If it is, what were the reasons for not including this ability in Aurelia?
Assuming my understanding is correct, it might be worth adding a note to the docs for Durandal users to explicitly state this difference. I'd be happy to contribute this, but would like to know the reasons its not included first.
The text was updated successfully, but these errors were encountered: