8000 docs($templateRequest): update the description with caching changes · MWGitHub/angular.js@6de0821 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6de0821

Browse files
rjametIgorMinar
authored andcommitted
docs($templateRequest): update the description with caching changes
The previous changes to $templateRequest were not documented, they now are.
1 parent 3c6e8ce commit 6de0821

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/ng/templateRequest.js

Lines changed: 6 additions & 4 deletions
< 78C3 td data-grid-cell-id="diff-6042b9749e8600fb2a10801c17c8c1f426c3eb6117196e0608d65c8d290816cd-11-9-2" data-line-anchor="diff-6042b9749e8600fb2a10801c17c8c1f426c3eb6117196e0608d65c8d290816cdL11" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-deletionLine-bgColor, var(--diffBlob-deletion-bgColor-line));padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell left-side-diff-cell border-right left-side">-
* stores the contents inside of `$templateCache`. If the HTTP request fails or the response data
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ var $compileMinErr = minErr('$compile');
77
* @name $templateRequest
88
*
99
* @description
10-
* The `$templateRequest` service downloads the provided template using `$http` and, upon success,
11
12-
* of the HTTP request is empty, a `$compile` error will be thrown (the exception can be thwarted
13-
* by setting the 2nd parameter of the function to true).
10+
* The `$templateRequest` service runs security checks then downloads the provided template using
11+
* `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request
12+
* fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the
13+
* exception can be thwarted by setting the 2nd parameter of the function to true). Note that the
14+
* contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted
15+
* when `tpl` is of type string and `$templateCache` has the matching entry.
1416
*
1517
* @param {string|TrustedResourceUrl} tpl The HTTP request template URL
1618
* @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty

0 commit comments

Comments
 (0)
0