Recompile ng-bind-html?

I have a variable that contains HTML that I want to translate into angular scope calls when they’re pulled into my app using ng-bind-html. I can use $sce to get angular to trust it as html and render it, but angular doesn’t go back and re-compile the directive and turn eg, ng-click="foo()" into a call into $ Is there a way to do this?

Example codepen:

Right now the DOM ends up with "ng-click=..." but no click handler is registered on what used to be a link.

check this out

1 Like