$ is not defined


#1

My app is logging in the console an uncaught exception:

Uncaught ReferenceError: $ is not defined

Does Ionic still use JQuery internally? It looks like something under the covers is attempting to reference the global $. Please reply if you’ve seen this before.


#2

Hi there, I’m currently using JQuery in my version 3 project. It’s working like a charm. Make sure to import JQuery as following:
import * as $ from "jquery";


#3

Thanks for the reply.

Where did you add this import statement? I tried adding it early: app.component.ts, main.ts and a few others. No cigar.


#4

You should add the import statement on every component you need to use JQuery.