I am getting the data from server in JSON and I am converting that to my viewModal
. Now I am loading the a new view using return router.navigate('results')
. But at the same time I want to pass the viewModel
which I created from the JSON object to be passed to this view. By default the "results" viewModel
is getting called but it is having blank values.
A small code snippet will be helpful as I am new to Durandal JS.
Ended up finally something like this.
This way when I navigated, I got all the values which I wanted to pass from one view to other. Hope this approach will help someone else.