I have the following scenario:
- index.html page loads angular and contains: ui-view
- layout.html page contains left menu that resolves data from server
- homepage.html use layout.html as his parent but needs to resolve his own data from server.
The problem is : when i resolve the parent the child is not resolving, when i remove the parent resolve, the child resolves.
can you help me, and let me know what am i doing wrong?
app.js
$stateProvider
.state('layout', {
url: "",
templateUrl: 'partials/layout.html',
controller:'LayoutController',
abstract:true,
resolve : {
result_data: function ($q,CommonService)
{
return resolve_layout($q,CommonService)
}
}
})
.state('homepage', {
url: "/homepage",
templateUrl: 'partials/homepage.html',
parent: 'layout',
controller:'HomepageController',
resolve : {
result_data: function ($q,CommonService)
{
return resolve_homepage($q,CommonService)
}
}
})