As I know, in angular 1.x I can use the $ sce service to satisfy my requirement like this
myApp.filter('trustAsHTML', ['$sce', function($sce){ return function(text) { return $sce.trustAsHtml(text); }; }]);
and in the html file use this
{{ htmlString || trustAsHTML }}
Is there a service like $ sce or some channel or some method can be competent to do this in angularjs 2 version?
html angular
Garry Nov 02 '15 at 7:04 2015-11-02 07:04
source share