Add .js scripts in Angular 2 project

前端 未结 3 654
慢半拍i
慢半拍i 2021-01-04 09:22

I am building a web app with Angular 2 framework and I want to use an external template (https://freehtml5.co/preview/?item=splash-free-html5-bootstrap-template-for-any-webs

3条回答
  •  鱼传尺愫
    2021-01-04 09:59

    Script tags are not allowed in component templates. Including scripts in your index.html should make them globally accessible. It isn't clear what you mean when you say you're browsing to another page, but if you use the angular router with router-outlet all scripts you import should be accessible.

提交回复
热议问题