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.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.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.$routeProvider.when()

when(path, route); Adds a new route definition to the $route service. Parameters Param Type Details path string Route path (matched against $location.path). If $location.path contains redundant trailing slash or is missing one, the route will still match and the $location.path will be updated to add or drop the trailing slash to exactly match the route definition. path can contain named groups starting with a colon: e.g. :name. All characters up to the next slash are matched and stored

ngRoute.ngView.$viewContentLoaded

$viewContentLoaded Emitted every time the ngView content is reloaded. Type: emit Target: the current ngView scope

ngRoute.service

Name Description $route $route is used for deep-linking URLs to controllers and views (HTML partials). It watches $location.url() and tries to map the path to an existing route definition. $routeParams The $routeParams service allows you to retrieve the current set of route parameters.