I have two states that need to use the same resolve:
.state('state', {
url: '/somewhere',
templateUrl: '/views/somewhere.html',
controller: 'myController',
resolve: {
//resolve something here
}
})
.state('state2', {
url: '/somewhere-else',
templateUrl: '/views/somewhere-else.html',
controller: 'myController',
resolve: {
//resolve the same thing here
}
})
But it would be nice not to write the same code so is it possible for states to share a resolve?