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

docs(ngInclude): clarity, formatting #4222

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

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