File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ var $compileMinErr = minErr('$compile');
7
7
* @name $templateRequest
8
8
*
9
9
* @description
10
- * The `$templateRequest` service downloads the provided template using `$http` and, upon success,
11
<
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
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.
14
16
*
15
17
* @param {string|TrustedResourceUrl } tpl The HTTP request template URL
16
18
* @param {boolean= } ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty
You can’t perform that action at this time.
0 commit comments