阅读背景:

如何在Karma单元测试中解析控制器中的$ q.all?

来源:互联网 

My controller has:

我的控制器有:

        switchUserAccount: function() {
            $scope.model.currentMode = 'user';
            console.log(ipCookie('currentPatientId'));
            $q.all([facilityCache.getFacility(), facilityGroupCache.getGroupList(), languageCache.getLanguageList(), genderCache.getGenderList(), raceCache.getRaceList(), dosingCache.getDosingOptions()])
                .then(function(){
                    console.log('back from then');
                    cache.set('ui', 'adminPage', '');
                    cache.set('ui', 'schedulePage', 'patients');
                    if(ipCookie('currentPatientId')) {
                        $location.path('/patient/view/' + ipCookie('currentPatientId'));
                    } else {
                        $location.path('/patients');
                    }
                });
        },
        switchUs



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: