javascriptangularjscordovangsanitize

angularjs and ng-bind-html not working correctly


I use angularjs with ng-bind-html and it works. But my html string looks like this:

<p>Hello <span style="font-size:40px;">World</span></p>

I would expect in the result, that World is bigger then Hello. But Hello and World has the same size!

Why that? Is this a problem from ngSanitize, or what can I do, that I get the right font-size?

regards


Solution

  • You can try this:

    <p>Hello <span style="font-size:40px !important;">World</span></p>
    

    With !important you can force your style to apply...