In this example $scope.myInputText variable has trusted html with the text "My name is John Steve" and the name "John Steve" is in bold tag. The variable $scope.myInputText is bind with the ng-bind-html directive and shows the name as bold. See the output.

<!DOCTYPE html> <html xmlns=""> <head> <title></title> <script src=""></script> <script src=""></script> </head> <body ng-app="myApp"> <div ng-controller="myController"> <span ng-bind-html="myInputText"></span> </div> <script> var app = angular.module("myApp", ['ngSanitize']); app.controller('myController', ['$scope','$sce', function ($scope,$sce) { $scope.myInputText = $sce.trustAsHtml("My name is <span><b>John Steve</b></span>"); }]); </script> </body> </html>