0

I'm trying to learn Angular 8 currently. I want to include external custom Javascript file in only specific component.html. What Configuration is need Configurations are needed for this?

1 Answers1

0

Either you use a library that you could include in your component :

npm install my-library    
import * as myLibrary from 'my-library'

Or you could import your Javascript library in your angular.json file in the script section.

You can also refer to this post : How to add external js file in angular 6 library

  • I was just answering,... Before being rude, you could have checked on Stack for an answer : https://stackoverflow.com/questions/48173259/import-3rd-party-javascript-libraries-in-angular-single-components – jean-charles Bonnard Aug 27 '19 at 08:13