angularjs - Accessing ng-click when rendered via $sce.trustAsHtml -


how access ng-click function (updaterating) in below?

https://jsfiddle.net/by2jax5v/171/

i'm using $sce.trustashtml render $scope.content

$scope.bindhtml = $sce.trustashtml($scope.content); 

your above code compiled sanitized angular js considering anchor tag insecure, therefore ng-click not work.

what want achieve can achieved using ng-html-compile francis bouvier instead of ng-bind-html. thinnest library have seen 1kb. https://github.com/francisbouvier/ng_html_compile

also refer https://stackoverflow.com/a/41790235


Comments

Popular posts from this blog

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -