Skip to content

Instantly share code, notes, and snippets.

@vikrant2mahajan
Last active August 28, 2020 10:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vikrant2mahajan/016f4852cb4a6db04fba to your computer and use it in GitHub Desktop.
Save vikrant2mahajan/016f4852cb4a6db04fba to your computer and use it in GitHub Desktop.
Angular sanitize safe HTML filter to user with angular ng-bind-html
filter('trust', ['$sce',function($sce) {
return function(value, type) {
return $sce.trustAs(type || 'html', value);
}
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment