I have an array of elements populated with an AJAX call to the ViewModel knockout that displays multiple data fields for each element on a web page.
Now I need the user to click on one element, filling the sidebar with the data obtained from the previous AJAX request (several fields plus much more).
I assume that id is usually required and execute a special AJAX item request, routing it through Sammy.js, but we donβt need to.
I am new to knockout; the best policy. I believe that to display data you need to have a ViewModel for various divs, but how to get ViewModels to transfer data between each other? Is it a taboo?
- Link to another window through a window object?
- Using a keyword with :? It continues to arise, but I do not see how to apply this in this context.
- Perhaps through Sammy.js and data caching in Amplify ?
This is an example of a drill-down function, and I read several StackOverflow Q&A articles, but couldn't find anything that I can use. I got to this stage following the John Papa PluralSight study guide.
source share