I have a HTML code I am dynamically changing based on the navigation stack. I am using ng-bind-html
to insert the string containing the code into the view. Now I need to be able to input the ng-click attribute into the view too. Everything is OK except the ng-click
attribute does not get injected and hence I am unable to quickly navigate in the breadcrumbs.
Here is the HTML I am passing to the view:
$scope.breadcrumbs = $scope.breadcrumbs + ' <i class="ion-ios-arrow-forward"></i> ' + '<span ng-click="goToLevel(pathLength)" class="browse-breadcrumbs-link">' + $scope.title + '</span>';
The class gets applied but the ng-click attribute gets simply ignored. What am I missing? Thanks.