如何在Angular的组件视图中添加脚本?如果我在component.html中编写它,它将在html页面的视图源中消失,但是我设法使用DOM sanitizer添加了脚本,并且在执行视图源时可以在页面的源代码中看到script标签,但angular只会忽略它。
这是我要添加到页面的脚本
<script
type='text/javascript'
src='https://test-www.payson.se/embedded/Content/payson.js?v2'>
</script>