2

I've noticed that scripts written in html templates are ignored in Angular (still learning it), but I want to run them sometimes despite the potential risks as stated by Angular. How could I do this?

Example:

@Component({
    templateUrl: '/html/pagex.html'
})

pagex.html:
<script>
    $(function(){alert("hi")})
</script>

Considering that some of my tags would generate JS code on runtime dynamically, modifying the script tag is not an option here.

Arnold Zahrneinder
  • 4,788
  • 10
  • 40
  • 76

0 Answers0