I am trying to store a HTML inside a scope variable and then use it in template view. When I was reading how to do this in angular, I came across ng-bind-html.
you are getting $sce:unsafe error...
this means you should use ng-bind-html-unsafe but newer version of angularjs does not include this directive anymore so you shoud use $sce.trustAsHtml() like this...
$scope.trustedInputHtml = $sce.trustAsHtml('');
but this way you cannot bind scope variables to your html so best way is writing a directive which can be replace with ng-bind-html-unsafe...
here is working PLUNKER for both $sce and directive examples...