My code as follows:
<div class="arInfo"><p class='article' ng-bind-html="bodyText"></p></div>
js:
$scope.bodyText = <p>In its decisions, <a href="#" ng-click= "open('http://www.facebook.com')">Facebook</a> ;
$scope.open = function(url){
window.open(url, '__blank');
}
But,when I click here, it will not open a new window.I think it because the $scope did not bind to here.
I try to change my code like this:
$scope.bodyText = $interpolate(<p>In its decisions, <a href="#" ng-click= "open('http://www.facebook.com')">Facebook</a>)($scope);
and this:
$scope.bodyText = $compile(<p>In its decisions, <a href="#" ng-click= "open('http://www.facebook.com')">Facebook</a>)($scope);
It also cannot work Anybody knows how to solve this problem?