File tree 1 file changed +6
-4
lines changed
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
- * 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