@@ -658,9 +658,9 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
658
658
} ;
659
659
660
660
this . $get = [
661
- '$injector' , '$interpolate' , '$exceptionHandler' , '$http' , '$templateCache ', '$parse' ,
661
+ '$injector' , '$interpolate' , '$exceptionHandler' , '$$templateRequest ' , '$parse' ,
662
662
'$controller' , '$rootScope' , '$document' , '$sce' , '$animate' , '$$sanitizeUri' ,
663
- function ( $injector , $interpolate , $exceptionHandler , $http , $templateCache , $parse ,
663
+ function ( $injector , $interpolate , $exceptionHandler , $$templateRequest , $parse ,
664
664
$controller , $rootScope , $document , $sce , $animate , $$sanitizeUri ) {
665
665
666
666
var Attributes = function ( element , attr ) {
@@ -1756,8 +1756,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
1756
1756
1757
1757
$compileNode . empty ( ) ;
1758
1758
1759
- $http . get ( $sce . getTrustedResourceUrl ( templateUrl ) , { cache : $templateCache } ) .
1760
- success ( function ( content ) {
1759
+ $$templateRequest ( $sce . getTrustedResourceUrl ( templateUrl ) )
1760
+ . then ( function ( content ) {
1761
1761
var compileNode , tempTemplateAttrs , $template , childBoundTranscludeFn ;
1762
1762
1763
1763
content = denormalizeTemplate ( content ) ;
@@ -1832,9 +1832,6 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
1832
1832
childBoundTranscludeFn ) ;
1833
1833
}
1834
1834
linkQueue = null ;
1835
- } ) .
1836
- error ( function ( response , code , headers , config ) {
1837
- throw $compileMinErr ( 'tpload' , 'Failed to load template: {0}' , config . url ) ;
1838
1835
} ) ;
1839
1836
1840
1837
return function delayedNodeLinkFn ( ignoreChildLinkFn , scope , node , rootElement , boundTranscludeFn ) {
0 commit comments