fix($emplateRequest): propagate rejection reason when ignoreRequestError flag is set

Closes #10266
This commit is contained in:
Pawel Kozlowski
2014-11-29 12:29:54 +01:00
parent ab2531143e
commit f6458826ac
2 changed files with 16 additions and 2 deletions

View File

@@ -48,12 +48,12 @@ function $TemplateRequestProvider() {
return html;
}, handleError);
function handleError() {
function handleError(resp) {
self.totalPendingRequests--;
if (!ignoreRequestError) {
throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl);
}
return $q.reject();
return $q.reject(resp);
}
}