I am a bit confused how to do this. Here is what I have:
resolve: {
objectiveDetailsExam: ['objectiveDetailService', 'subjectService',
function (objectiveDetailService: IObjectiveDetailService, subjectService: ISubjectService) {
objectiveDetailService.getObjectiveDetailsExam("/" + subjectService.subject.id)
.then((results): ng.IPromise<any> => {
return objectiveDetailService.getObjectiveDetailsObjective("/" + objectiveDetailService.examId);
});
}]
}
or should it be this which has a return
before the objectiveDetailService.getObjectiveDetailsExam:
resolve: {
objectiveDetailsExam: ['objectiveDetailService', 'subjectService',
function (objectiveDetailService: IObjectiveDetailService, subjectService: ISubjectService) {
return objectiveDetailService.getObjectiveDetailsExam("/" + subjectService.subject.id)
.then((results): ng.IPromise<any> => {
return objectiveDetailService.getObjectiveDetailsObjective("/" + objectiveDetailService.examId);
});
}]
}
Either actually seem to work and as the call executes quickly I cannot see which is correct.
Can someone advise do I need one or two returns in the resolve which is supposed to return true or false?