25 lines
1.2 KiB
HTML
Executable file
25 lines
1.2 KiB
HTML
Executable file
<h1><code ng:non-bindable="">ngCsp</code>
|
|
<span class="hint">(directive in module <code ng:non-bindable="">ng</code>
|
|
)</span>
|
|
</h1>
|
|
<div><a href="http://github.com/angular/angular.js/edit/master/src/ng/directive/ngCsp.js" class="improve-docs btn btn-primary">Improve this doc</a><h2 id="Description">Description</h2>
|
|
<div class="description"><p>Enables <a href="https://developer.mozilla.org/en/Security/CSP">CSP (Content Security Policy)</a> support.
|
|
This directive should be used on the root element of the application (typically the <code><html></code>
|
|
element or other element with the <a href="api/ng.directive:ngApp"><code>ngApp</code></a>
|
|
directive).</p>
|
|
|
|
<p>If enabled the performance of template expression evaluator will suffer slightly, so don't enable
|
|
this mode unless you need it.</p></div>
|
|
<h2 id="Usage">Usage</h2>
|
|
<div class="usage">as attribute<pre class="prettyprint linenums"><html ng-csp>
|
|
...
|
|
</html></pre>
|
|
as class<pre class="prettyprint linenums"><html class="ng-csp">
|
|
...
|
|
</html></pre>
|
|
<h3 id="Directive.info">Directive info</h3>
|
|
<div class="directive-info"><ul><li>This directive executes at priority level 1000.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|