Podcast/lib/angular/docs/partials/api/ng.directive:ngCsp.html
2013-04-07 11:37:21 +02:00

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>&lt;html&gt;</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">&lt;html ng-csp&gt;
...
&lt;/html&gt;</pre>
as class<pre class="prettyprint linenums">&lt;html class="ng-csp"&gt;
...
&lt;/html&gt;</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>