© 2024 fjorge. All rights reserved.
How to install and use jQuery in Angular 6

First run:
This will add jquery to the package list and make it a dependency. Next in your componentname.component.ts file add:
jQuery has now been added to the component and can be used from this location. Write all jQuery within the ngOnInit() { } function and you will now see it running on your page.
Example component.ts file: