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