I want to navigate to a view html file (from another view's js file) but pass in the model to be used by that view. How can I do this please.
I can generally do this when I am opening the new view in a dialog. In this case, I create the model object (var model = require('viewmodels/modeljsfile), and then creating an instance of this model and accessing the properties (var instance = new model(); instance.property1 = 'Test). I then pass this instance to my modal.
Instead of opening in view html in a modal, I want to redirect to the actual view. How can I do this please?
In the view add a Compose and state the target view/model. Note that both the View/Model can be variables from the parent view.
Be careful however as not all the life cycle events are attached (activator.js)
http://durandaljs.com/documentation/Using-Composition.html