search: function () {
this.activeScreen({ model: 'viewmodels/results', transition: 'entrance' });
},
types: ko.observableArray(["A", "B"]),
selectedType: ko.observable(),
activeScreen: ko.observable()
}
searchView:
<select data-bind="options: types, value: selectedType" />
<button data-bind="click: search">Search</button>
<div>
<div data-bind="compose: activeScreen"></div>
</div>
Now this shows the results screen with nice transition, but activate function isn't called.
Also I still don't know how to pass that selectedType. I imagine I should be able to pass it to the view I want to show and there in activate function go to server to get data to display.
But probably I'm thinking wrong.