I'm using DurandalJs 2.0 and KnockoutJs. I have two HTML pages, add.html and show.html with their JS files. I want to display both pages as composition in one index.html page. On the left is show.html and displays added records, on the right is add.html which allows users to add records.
My problem is that; show.html page should instantly show or append the record as the user adds a new record. When I add a record, it is updated in the repository.js, but how to refresh only show.html to read new record. I tried router.navigate("#/client/index") but it did not work.
<div>
<div id="global">
<!-- ko compose: {model: 'viewmodels/client/show', view:'views/client/show'} -->
<!-- /ko-->
<div id="main" class="container">
<!--ko compose: {model: router.activeItem,
afterCompose: router.afterCompose,
transition: 'entrance'} -->
<!-- /ko-->
</div>
<div id="push">
<!-- ko compose: {model: 'viewmodels/client/add', view:'views/client/add'} -->
<!-- /ko-->
</div>
</div>