Last active
July 13, 2018 20:05
-
-
Save kmaida/10f218a0ca94edbd1d0a to your computer and use it in GitHub Desktop.
AngularJS 1.2+ - $sce.trustAsHtml() using a filter. Usage: ng-bind-html="string | trustAsHTML"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myApp.filter('trustAsHTML', ['$sce', function($sce){ | |
return function(text) { | |
return $sce.trustAsHtml(text); | |
}; | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment