Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit a005797

Browse files
jdavisp3petebacondarwin
authored andcommitted
docs(ngInclude): clarity, formatting
Closes #4222
1 parent b5214aa commit a005797

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

src/ng/directive/ngInclude.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,19 @@
88
* @description
99
* Fetches, compiles and includes an external HTML fragment.
1010
*
11-
* Keep in mind that:
12-
*
13-
* - by default, the template URL is restricted to the same domain and protocol as the
14-
* application document. This is done by calling {@link ng.$sce#getTrustedResourceUrl
15-
* $sce.getTrustedResourceUrl} on it. To load templates from other domains and/or protocols,
16-
* you may either either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or
17-
* {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value. Refer Angular's {@link
18-
* ng.$sce Strict Contextual Escaping}.
19-
* - in addition, the browser's
20-
* {@link https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest
21-
* Same Origin Policy} and {@link http://www.w3.org/TR/cors/ Cross-Origin Resource Sharing
22-
* (CORS)} policy apply that may further restrict whether the template is successfully loaded.
23-
* (e.g. ngInclude won't work for cross-domain requests on all browsers and for `file://`
24-
* access on some browsers)
11+
* By default, the template URL is restricted to the same domain and protocol as the
12+
* application document. This is done by calling {@link ng.$sce#getTrustedResourceUrl
13+
* $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols
14+
* you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or
15+
* {@link ng.$sce#trustAsResourceUrl wrap them} as trusted values. Refer to Angular's {@link
16+
* ng.$sce Strict Contextual Escaping}.
17+
*
18+
* In addition, the browser's
19+
* {@link https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest
20+
* Same Origin Policy} and {@link http://www.w3.org/TR/cors/ Cross-Origin Resource Sharing
21+
* (CORS)} policy may further restrict whether the template is successfully loaded.
22+
* For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`
23+
* access on some browsers.
2524
*
2625
* @animations
2726
* enter - animation is used to bring new content into the browser.

0 commit comments

Comments
 (0)