i want to call 2 api and want to store the response in the scope variable. but im not able to get the data in the scope variable. im using $q.all and service for calling the api
function loadData() { var promises = [ doorService.get(), waterService.get() ]; $q.all(promises).then(function (resp) { $scope.DoorData= resp[0].data; $scope.WatertankData= resp[1].data; $scope.combineResult = { 'DoorData': resp[0].data, 'WatertankData':resp[1].data }; }); }