Jquery in Ionic and Typescript

You don’t need jQuery to update your DOM elements.

I use a progress bar in my file transfer upload example. See the html and typescript to see how I update the progress. If you want a more detailed example I’d like to see some code (your html and typescript) to get me started.

If you really insist on using jQuery; without knowing the error you have gotten it is highly likely that you forgot to import jQuery in your typescript file.

First install the package.

npm install jquery --save

Install (typings and) the typings file

npm install -g typings
typings install dt~jquery --global --save

and finally, import the jquery to your ts file

import * as $ from 'jquery'
9 Likes