mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-04-17 21:31:02 +00:00
we now have two types of namespaces: - true namespace: angular.* - used for all global apis - virtual namespace: ng.*, ngMock.*, ... - used for all DI modules the virual namespaces have services under the second namespace level (e.g. ng.) and filters and directives prefixed with filter: and directive: respectively (e.g. ng.filter:orderBy, ng.directive:ngRepeat) this simplifies urls and makes them a lot shorter while still avoiding name collisions
27 lines
700 B
JavaScript
27 lines
700 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* @ngdoc directive
|
|
* @name ng.directive:ngCsp
|
|
* @priority 1000
|
|
*
|
|
* @description
|
|
* Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support.
|
|
* This directive should be used on the root element of the application (typically the `<html>`
|
|
* element or other element with the {@link ng.directive:ngApp ngApp}
|
|
* directive).
|
|
*
|
|
* If enabled the performance of template expression evaluator will suffer slightly, so don't enable
|
|
* this mode unless you need it.
|
|
*
|
|
* @element html
|
|
*/
|
|
|
|
var ngCspDirective = ['$sniffer', function($sniffer) {
|
|
return {
|
|
priority: 1000,
|
|
compile: function() {
|
|
$sniffer.csp = true;
|
|
}
|
|
};
|
|
}];
|