mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-28 21:05:43 +08:00
fix($emplateRequest): propagate rejection reason when ignoreRequestError flag is set
Closes #10266
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user