I am utilizing Angular with ui-router, so the toResolve
variable will be resolved in my SomeController
.
.state('some.state', {
url: '/some',
controller: 'SomeController',
templateUrl: '/static/views/some-state.html',
resolve: {
toResolve: function(Resource) {
return Resource.get(function(response) {
return response;
});
},
However, I am facing a challenge on how to effectively test this functionality using Jasmine. In a hypothetical scenario where I omit the return
statement, the toResolve
within my scope would then become undefined.