Roufid

How to use jQuery with Angular – Step by step integration

Angular

In this tutorial you will learn How to use jQuery with Angular.

Install the dependency

NPM is used in this tutorial, so install the jquery dependency like the following :

Add the jquery script

You can either add the script directly in the index.html file (not recommended) or if you are working with Angular-cli, add the relative path to jquery in the angular.json file.

Use jquery

You can then use jquery lile below :

That’s it.


The tutorial source code is available on Github. Download the source

References