Last active
August 29, 2015 14:10
-
-
Save exit99/06ebf756c08a9e815501 to your computer and use it in GitHub Desktop.
This file contains 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
qaApp.filter('safe', function ($sce) { | |
return function (value) { | |
return $sce.trustAsHtml(value); | |
}; | |
}); | |
qaApp.filter('nl2br', function() { | |
return function(data) { | |
if (!data) return data; | |
return data.replace(/\n\r?/g, '<br />'); | |
}; | |
}); | |
ng-bind-html="scope_variable | nl2br | safe" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment