本文整理汇总了TypeScript中entcore.angular.isUndefined方法的典型用法代码示例。如果您正苦于以下问题:TypeScript angular.isUndefined方法的具体用法?TypeScript angular.isUndefined怎么用?TypeScript angular.isUndefined使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entcore.angular
的用法示例。
在下文中一共展示了angular.isUndefined方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
angular.forEach(grainCopy.grain_copy_data.custom_copy_data.filled_answer_list, function(filled_answer, key){
if(angular.isUndefined(filled_answer.isChecked)){
filled_answer.isChecked = false;
}
if(angular.isUndefined(grainScheduled.grain_data.custom_data.correct_answer_list[key].isChecked)){
grainScheduled.grain_data.custom_data.correct_answer_list[key].isChecked = false;
}
if(filled_answer.isChecked === grainScheduled.grain_data.custom_data.correct_answer_list[key].isChecked){
if(grainScheduled.grain_data.custom_data.correct_answer_list[key].isChecked){
// response is check and good
// in this case numberGoodAnswer++
numberRecognizedAnswer++;
isCorrectReturnArray[key] = true;
if(grainScheduled.grain_data.custom_data.no_error_allowed && atLeastOneError){
// do not incremented
} else{
numberGoodAnswer++
}
} else {
// response is not check and good
// in this case the answer is not good
isCorrectReturnArray[key] = undefined;
}
} else {
isCorrectReturnArray[key] = false;
atLeastOneError = true;
numberRecognizedAnswer++;
if(grainScheduled.grain_data.custom_data.no_error_allowed){
numberGoodAnswer = 0;
}
if(grainScheduled.grain_data.custom_data.correct_answer_list[key].isChecked){
// response is check and not good
isCorrectReturnArray[key] = true;
} else {
// response is not check and not good
isCorrectReturnArray[key] = false;
}
}
});
示例2: function
link: (scope:any) => {
var result = AssociationService.automaticCorrection(scope.grainScheduled, scope.grainCopy);
scope.isCorrect = result.answers_result;
if (angular.isUndefined(scope.grainCopy.calculated_score) || scope.grainCopy.calculated_score === null) {
scope.grainCopy.calculated_score = result.calculated_score;
scope.$emit('E_UPDATE_GRAIN_COPY', scope.grainCopy);
}
scope.updateGrainCopy = function () {
if (scope.isTeacher) {
scope.$emit('E_UPDATE_GRAIN_COPY', scope.grainCopy);
}
};
}