I am using angular ui router, and have a parent abstract state ("home") and two child state ("home.ports" and "home.editPort"). state. "home.state" is a default state, so on page refresh when the home.state loads it first trigger the parent ("home") state which in turn trigger the http request in the resolve property. My child state can me make changes on the server and can update the list of the parent state. So, the problem is when I am going to child state ("home.editPort") and come back to home.ports its not triggering the home state to fetch the updated listing
.state('home', {
url: "/home",
templateUrl: "dest/partials/home/_home.html",
controller: "HomeController",
abstract : true,
data: {
requireLogin: true
},
resolve: {
// making an http request
jqTreeData : ['httpService', 'BASE_HOME_URL', function (httpService, BASE_HOME_URL) {
var obj = {
url : BASE_HOME_URL + "emulationDetails",
responseType : "json",
method : "GET"
};
return httpService.makeAjax(obj);
}]
}
})
.state('home.ports', {
url: "/ports",
//templateUrl: "dest/partials/home/ports/_portList.html",
template: "<custom-Table tbl-Caption='Port Listing'></custom-Table>",
controller: "PortsListController"
})
.state('home.editPort', {
url: "/editPort",
template: "<h1>Edit ports</h1>"
});