My state definition looks like:
.state('repository', {
url: '/repository/:host/:owner/:repository',
views: {
appView: {
templateUrl: '/templates/app/repository.html'
},
'repositoryView@repository': {
templateUrl: '/templates/app/_repositoryAnalytics.html'
}
},
resolve: {
resolvedRepository: [
'$stateParams', 'RepositoryService', function($stateParams, RepositoryService) {
console.log(RepositoryService.find($stateParams.host, $stateParams.owner, $stateParams.repository));
return 1;
}
]
},
controller: 'AnalyticsController'
});
However, it hands and never gets to the AnalyticsController. If I remove the resolve, then it works just fine (except, of course, I don't have the resolved value).
I did return 1 for now just to see if it would return something without worrying about promises. I did the console.log to see if it hit, and it does not.