This example demonstrates how to display a view based on the selected tab. The main idea is to use the if binding to display an appropriate partial view based on the selected tab index.
See also:
T267165: dxTabs - How to display a content based on the selected tab - AngularJS Approach
Question Comments
Added By: David Ninnes 2 at: 5/11/2015 5:47:18 PM
How would you create a viewmodel to be loaded for Tab0?
I've tried creating a Tab0.js and loading it in the index.html but it doesn't get loaded.
Application1.Tab0 = function (params) {
var viewModel = {
viewShown: function () {
alert('here');
},
};
return viewModel;
};
... I added this
<!-- ko with: Application1.Tab0 -->
to Tab0.dxview and the viewModel is built but the viewShown method isn't called still
Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T240390: dxTabs - How to display a view based on the selected tab. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.