My Angular UI router is giving me trouble. When I navigate to the state below, everything works smoothly. However, if I refresh the page, the resolve function retrieves the data, injects it into the controller, but the view does not load. Essentially, the state functions properly when accessed through a ui-sref link or $state.go, but not when the page is refreshed. Has anyone else faced this issue in the past?
$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);
}
}