var app = angular.module('plunker', ['ngSanitize']);
app.controller('MainCtrl', function($scope,$sce) {
$scope.html ="";
$scope.result="";
$scope.submit=function(html){
$scope.result=$sce.trustAsHtml(html);
}
});
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link rel="stylesheet" href="style.css" />
<script data-require="angular.js@1.4.x" src="https://code.angularjs.org/1.4.9/angular.js" data-semver="1.4.9"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular-sanitize.js"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
<textarea ng-model="html" rows="10" cols="50" placeholder="Enter html"></textarea>
</br>
<button ng-click="submit(html)">Submit</button>
<div ng-bind-html="result">
</div>
</body>
</html>
/* Put your css in here */