Use stateProvider with nested states and views https://github.com/angular-ui/ui-router/wiki/Multiple-Named-Views
$stateProvider.state('/home', {
url: '/home',
templateUrl: '',
controller: ''
})
.state('home.app1', {
url: '/home/app1',
templateUrl: '',
controller: ''
})
.state('home.app1.cat1', {
url: '/home/app1/cat1',
templateUrl: '',
controller: ''
})
.state('home.app1.cat1.cat2', {
url: '/home/app1/cat1/cat2',
templateUrl: '',
controller: ''
})
.state('home.app1.cat1.cat2.cat3', {
url: '/home/app1/cat1/cat2/cat3',
templateUrl: '',
controller: ''
})
.state('home.app2', {
url: '/home/app2',
templateUrl: '',
controller: ''
})
.state('home.app3', {
url: '/home/app3',
templateUrl: '',
controller: ''
})
$routerUrlProvider.otherwise('/home'); // if no path matched
I didn't mention named views. you can go through the link and It helps a lot.
But the above makes heavy structuring of states. So, you need to display a relevant info in a single state. For example, if there are three categories, and you want to show in single page then you can define a state like this.
.state('home.app1',{
url: '/home/app1',
views: {
"view1": {
templateUrl: 'cat1.html',
controller: ''
},
"view2": {
templateUrl: 'cat2.html',
controller: ''
},
"view3": {
templateUrl: 'cat3.gtml',
controller: ''
}
}
})
Or you can have a single parent controller for all the views.
now, in html you will have
<div>
<div ui-view="view1"></div>
<div ui-view="view2"></div>
<div ui-view="view3"></div>
</div>