I have a ui-view
inside index.html.
Inside this ui-view, i have added child ui-view="child1"
which is working fine using $stateProvider state with nested views. Now on tab switch i want to change only child ui-view which is named "child1", but keeping parent ui-view as same (as i am on same page, just part of page is changing).
Is there any way we can achieve using routes? I also want to change url parameter so that on refresh I know which tab was open, so that i can open same tab using routes.
$stateProvider
.state('main', {
url: '/',
views: {
'': {
templateUrl: 'assets/views/main.html',
controller: 'mainInitCtrl',
},
'child1': {
templateUrl: 'assets/views/child1.html',
controller: 'childInitCtrl',
}
}
});