How to install jquery in angular 6

How to install Jquery in Angular:
npm install jquery
It will install the latest version of the jquery after then go to the left sidebar of the vs code. 
You will find a file name "package.json" and check "jquery": "^3.3.1", that you have added.
 
then go to the "angular.json" file and go to the script section and add path manually as added in the screenshot. And also add manually custom file or as you wish your file name.
 and go to the HTML section where you will create a part of the HTML and go to the
custom.js and write your jquery code then run your project with the ng serve -o command as given in the screenshot below:
 You will find your code is working now:

No comments:

Note: Only a member of this blog may post a comment.

Copyright Reserved to Anything Learn. Powered by Blogger.