Use JQuery in Angular7

Of course using Jquery in Angular2+ is not good practice, but in really urgent case is not bad to know how to use jquery in  angular7 components.

  1. npm i @types/jquery --save
  2. open and add jquery in types
    ex.  “types”: [“jquery”]

In some cases, if you need to touch the bootstrap, so needs to run this code too.

npm i -D @types/bootstrap


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s