0
を返しません。ここにサービスがあります:リゾルバ機能は、私は、各itarationでHTTPサービスを呼び出すループを持っている私のリゾルバ機能では何も
(function() {
"use strict";
angular.module("reportBuilder").factory("reportService", ["$http", "config", reportService]);
function reportService($http, config) {
var serviceUrl = config.baseUrl + "api/Reports/";
var service = {
getDetailsReport: detailsReport
};
return service;
function detailsReport(clientId, date, frequencies) {
if (!date && !clientId) return null;
return $http.get(serviceUrl + "ReportDetailed/" + clientId + "/" + date + "/" + frequencies);
}
}
})();
次のループとtの繰り返しを開始する前に、httpサービスが終了するまで待つ必要があります。彼は結果を返します。この目的のために、私は$q.all
を上記のレゾルバ入会に使用します。
しかし、リゾルバ関数は何も返しません。なぜ私は間違っていますか?リゾルバ関数は何も返さないのですか?
は、私はあなたの方法をしようと試みたが、まだ機能しませ私はすべてのエラーを取得しない方法で、HTTP servicve – Michael
によってfatchedデータを返しますありがとう – Michael