mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-16 10:43:10 +00:00
docs(minErr): improve sce/isecurl doc
This commit is contained in:
parent
0bf0570505
commit
934e569cca
1 changed files with 7 additions and 11 deletions
|
|
@ -1,22 +1,18 @@
|
||||||
@ngdoc error
|
@ngdoc error
|
||||||
@name $sce:insecurl
|
@name $sce:insecurl
|
||||||
@fullName Blocked loading an untrusted resource
|
@fullName Processing of a Resource from Untrusted Source Blocked
|
||||||
@description
|
@description
|
||||||
|
|
||||||
AngularJS' {@link api/ng.$sce#strictcontextualescaping Strict Contextual Escaping
|
AngularJS' {@link api/ng.$sce#strictcontextualescaping Strict Contextual Escaping (SCE)} mode (enabled by default) has blocked loading a resource from an insecure URL.
|
||||||
(SCE)} mode (enabled by default) has blocked loading a resource from an insecure URL.
|
|
||||||
|
|
||||||
Typically, this would occur if you're attempting to load an Angular template from a different
|
Typically, this would occur if you're attempting to load an Angular template from an untrusted source.
|
||||||
domain. It's also possible that a custom directive threw this error for a similar reason.
|
It's also possible that a custom directive threw this error for a similar reason.
|
||||||
|
|
||||||
Angular only loads templates from trusted URLs (by calling {@link api/ng.$sce#getTrustedResourceUrl
|
Angular only loads templates from trusted URLs (by calling {@link api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl} on the template URL).
|
||||||
$sce.getTrustedResourceUrl} on the template URL.).
|
|
||||||
|
|
||||||
By default, only URLs to the same domain with the same protocol as the application document are
|
By default, only URLs that belong to the same origin are trusted. These are urls with the same domain and protocol as the application document.
|
||||||
considered to be trusted.
|
|
||||||
|
|
||||||
The {@link api/ng.directive:ngInclude ng-include} directive and {@link guide/directive directives}
|
The {@link api/ng.directive:ngInclude ngInclude} directive and {@link guide/directive directives} that specify a `templateUrl` require a trusted resource URL.
|
||||||
that specify a `templateUrl` require a trusted resource URL.
|
|
||||||
|
|
||||||
To load templates from other domains and/or protocols, either adjust the {@link
|
To load templates from other domains and/or protocols, either adjust the {@link
|
||||||
api/ng.$sceDelegateProvider#resourceUrlWhitelist whitelist}/ {@link
|
api/ng.$sceDelegateProvider#resourceUrlWhitelist whitelist}/ {@link
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue