My goal is to show a detailed view of an item using Bootstrap modal mechanism in Durandal. Assume i have a viewmodel: 'itemdetail' and another viewmodel: 'items'. The modal element of Bootstrap is located on items.html but it is called from itemdetail.js in the viewAttached function.
I was able to figure out how to navigate to a detailed view of an item using the router (by passing the id 'myroute/:id') but i couldn't figure out how to compose it without the routing. I would expect something like that:
<div data-bind="compose: {model: viewmodels/myvm, activate:true, id:itemID}
I understand that i can use and observable and pass it some settings. But i don't know if the settings include my own parameters.
Eventualy i would like to inject this composition (the detailed description of the item) into a bootstrap modal and call it from itemdetails (attachedView).
Does it make any sense? is there a better way to do it?
thanks, David