In app I have named view mainContent.
<div class = "wrapper"
ui-view = "mainContent">
</div>
I have only one route for this view.
$stateProvider
.state("home",
{
url: "/home",
views: {
'mainContent': {
templateUrl: "app/home/home.html"
}
}
});
I load home.html to named view mainContent view which has also named view appContent.
home.html
<div class = "row"
ui-view = "appContent">
</div>
Routes for nested named view appContent are here.
$stateProvider
.state("request",
{
parent: "home",
abstract: true,
url: "/request"
})
.state("request.create", {
url: "/create",
views: {
appContent: {
templateUrl: "app/requests/create/createRequest.html",
controller: "RequestController as vm"
}
}
});
When I try load http://.../#/home/request/create RequestController is not created and also view createRequest.html is not loaded.
From view navigate to request.create state with :
<a ui-sref = "request.create"><i class = "fa fa-plus"></i>New</a>
Thank