First, get the file:
npm install --save angular-sanitize@X.Y.Zor
yarn add angular-sanitize@X.Y.Z
bower install angular-sanitize#X.Y.Z
where X.Y.Z is the AngularJS version you are running.
angular-sanitize.js in your HTML:
<script src="path/to/angular.js"></script> <script src="path/to/angular-sanitize.js"></script>
Finally, load the module in your application by adding it as a dependent module:
With that you're ready to get started!
ngSanitize module provides functionality to sanitize HTML.
$sanitize for usage.
Finds links in text input and turns them into html links. Supports
Sanitizes an html string by stripping all potentially dangerous tokens.
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.