I am working on a SPA that I would like to use multiple master views. Here is my use case:
I have a user that has a profile page. Within that profile page I would like to be able to display a couple of different views, ie. details, works, contact info, etc. I need to be able to deep link to each of these views. Each of these views must display the basic user data from the master layout view.
It is my understanding that I should be using compose for this and I have a bit of code that seems to work, however, I want to be able to pass data from the "secondary shell" down to the actual sub view. It seems that the splat data is not passed along to the activate method of the sub viewmodel.
In my "master" viewmodel I have created an observable called activeView that contains a string corresponding to a sub viewmodel (viewmodels/user/details). I then have a knockout statement that is as follows:
<!-- ko compose: {
model: activeView(),
activate: true
} --><!-- /ko -->
How can I pass data to the sub view? Or is there a better way to do this?
Thanks in advance!