ngSanitize.filter

Name Description linky Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and plain email address links.

ngSanitize.$sanitizeProvider.enableSvg()

enableSvg([regexp]); Enables a subset of svg to be supported by the sanitizer. By enabling this setting without taking other precautions, you might expose your application to click-hijacking attacks. In these attacks, sanitized svg elements could be positioned outside of the containing element and be rendered over other elements on the page (e.g. a login link). Such behavior can then result in phishing incidents. To protect against these, explicitly setup overflow: hidden css rule for all pot

ngSanitize.linky

filter in module ngSanitize Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and plain email address links. Requires the ngSanitize module to be installed. Usage In HTML Template Binding <span ng-bind-html="linky_expression | linky"></span> In JavaScript $filter('linky')(text, target, attributes) Arguments Param Type Details text string Input text. target string Window (_blank|_self|_parent|_top) or named frame to open links

ngSanitize.provider

Name Description $sanitizeProvider Creates and configures $sanitize instance.

ngSanitize

Installation First include angular-sanitize.js in your HTML: <script src="angular.js"> <script src="angular-sanitize.js"> You can download this file from the following places: Google CDN e.g. //ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-sanitize.js Bower e.g. bower install angular-sanitize@X.Y.Z code.angularjs.org e.g. "//code.angularjs.org/X.Y.Z/angular-sanitize.js" where X.Y.Z is the AngularJS version you are running. Then load the module in your application by

ngSanitize.$sanitize

$sanitizeProvider service in module ngSanitize Sanitizes an html string by stripping all potentially dangerous tokens. The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are then serialized back to properly escaped html string. This means that no unsafe input can make it into the returned string. The whitelist for URL sanitization of attribute values is configured using the functions aHrefSanitizationWhitelist and imgSrcSanitizationWhitelist of $

ngSanitize.$sanitizeProvider

$sanitize provider in module ngSanitize Creates and configures $sanitize instance. Methods enableSvg([regexp]); Enables a subset of svg to be supported by the sanitizer. By enabling this setting without taking other precautions, you might expose your application to click-hijacking attacks. In these attacks, sanitized svg elements could be positioned outside of the containing element and be rendered over other elements on the page (e.g. a login link). Such behavior can then result in

ngRoute.directive

Name Description ngView Overview ngView is a directive that complements the $route service by including the rendered template of the current route into the main layout (index.html) file. Every time the current route changes, the included view changes with it according to the configuration of the $route service.

ngRoute.ngView

directive in module ngRoute Overview ngView is a directive that complements the $route service by including the rendered template of the current route into the main layout (index.html) file. Every time the current route changes, the included view changes with it according to the configuration of the $route service. Requires the ngRoute module to be installed. Directive Info This directive creates new scope. This directive executes at priority level 400. Usage as element: (This directive

ngRoute.provider

Name Description $routeProvider Used for configuring routes.