var myApp = angular.module('myApp', []); myApp.controller('MyCtrl', myController); myController.$inject = ['$scope', '$sce'] function myController($scope, $sce) { $scope.html = $sce.trustAsHtml("<b>HTML inserted</b>"); }; /* Notice that the html IS interpreted by the browser */
<div ng-controller="MyCtrl as vm"> <div>Html</div> <div ng-bind-html="html"> </div> <br/> </div>