Problem Angular will not parse the directives inside your ng-bind-html .
The correct solution to this is to create a html compilation directive that you have included
.directive('compile', ['$compile', function ($compile) { return function(scope, element, attrs) { scope.$watch( function(scope) { return scope.$eval(attrs.compile); }, function(value) { element.html(value); $compile(element.contents())(scope); } ); }; }])
Then you can refer to firstName as <div compile="firstName"><div>
source share