I am having an issue with Angular UI router. When I route the below state, it works completely fine. However, when I refresh the page, the resolve gets the data, it is injected into the controller, but the view does not load. In short, the state works fine when it is routed to via a ui-sref link or $state.go, but not when the page is refreshed. Has anyone encountered this issue before?
$stateProvider.state('information', {
templateUrl: 'information.html',
resolve:{
'infoData': function($q, myFactory) {
var data = {};
data.first = myFactory.get(1);
return $q.all({first: data.first.$promise});
}
},
controller: function($scope, infoData){
console.log(infoData);
}
}