Here I am having a simple html element which I am trying to bind to Html using ng-bind-html.
But this doesn't seems to be working:
.controller('foo', function($scope) {
$scope.bar = "<h1>this is bar</h1>";
$scope.bar1 = "<h1> <a ng-href='www.google.com'> this is bar </a></h1>";
});
<div ng-controller="foo">
<div ng-bind-html="bar1"></div>
</div>
If I use normal href, it works fine. Can anyone please explain why ng-href not working in this case or let me know how to make this work.