如何執行 component html 檔裡面的 <script></script> 內容

今天發現在 component 裡面的 html

< script >
alert(‘test’);
< /script >

完全沒反應說~
因為想使用第三方的 jquery 的套件
需要使用去呼叫相關的方法
想請問要怎麼寫才對呢?
謝謝~

如果有在 index.html 的畫面引用第三方套件時,就可以在 component.ts 內使用, 類似這篇文章中的寫法

1個讚