当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript angular.isUndefined方法代码示例

本文整理汇总了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;

                }
            }
        });
开发者ID:OPEN-ENT-NG,项目名称:exercizer,代码行数:45,代码来源:QcmService.ts

示例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);
                    }
                };
            }
开发者ID:OPEN-ENT-NG,项目名称:exercizer,代码行数:15,代码来源:viewAssociation.ts


注:本文中的entcore.angular.isUndefined方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。