Ng-bind-html cut html text?

I have a function node that produce a msg.payload like this:

<div class="ctimer_block_empty"></div>
<div id="00:00" class="ctimer_block_free" onClick="func1('00:00')"></div>
<div id="00:30" class="ctimer_block_free" onClick="func1('00:30')"></div>
<div class="ctimer_block_empty"></div>

then I pass the msg.payload in input to a template node:

<div class="container_timer" ng-bind-html="msg.payload"></div> to render the html.

But in the browser I can't click the div and if I parse the page id and onClick are gone!
I trace the msg.payload and is complete, I also use ng-bind and I can see all my html code.
Why ng-bind-html cut my html text?
What am I doing wrong?

Thanks in advance for anyone who can help me.

By default Angular strips out anything not-trusted - so any script tags etc.

You can add a filter to allow everything eg

<div ng-bind-html="msg.payload | trusted"></div>

WOOOW!!! :grinning: :grinning: :grinning: :v: :v: :v:

I solved
Thank you very much!!!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.