Natixco
Natixco

Reputation: 1

Import JS library into Angular 7

I'd like to import Cleave.js and rellax.js to my project. I have jquery imported and its working fine. For these libraries I need to write their specific attributes in the html. How can I import these libs?

angular.json

"scripts": [
  "node_modules/jquery/dist/jquery.min.js",
  "node_modules/cleave.js/dist/cleave.min.js",
  "node_modules/rellax/rellax.min.js"
 ]

Upvotes: 0

Views: 499

Answers (1)

Vijay Daswani
Vijay Daswani

Reputation: 142

Install the libraries using Node package manager.

npm install --save Cleave
npm install --save rellax

Which will download the dependencies & also add it to package.json

Upvotes: 1

Related Questions