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?
-
Please Refer This Link stackoverflow.com/questions/37081943/…Dixit Savaliya– Dixit Savaliya2019-08-27 07:50:58 +00:00Commented Aug 27, 2019 at 7:50
-
i saw it but when used it code the my custom js file added as global.გენო მუმლაძე– გენო მუმლაძე2019-08-27 07:54:05 +00:00Commented Aug 27, 2019 at 7:54
-
i want that test.js file to appear as local , in only specific component.htmlგენო მუმლაძე– გენო მუმლაძე2019-08-27 07:55:21 +00:00Commented Aug 27, 2019 at 7:55
Add a comment
|
1 Answer
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
1 Comment
jean-charles Bonnard
I was just answering,... Before being rude, you could have checked on Stack for an answer : stackoverflow.com/questions/48173259/…