How to install and use jquery in ionic 2?

How to install and use jquery in ionic 2? I use ionic documentation for using third party libs for it.

I have followed these steps:

  1. npm install @types/jquery --save - it is OK

  2. npm install @types/jquery-mask-plugin --save - it is OK

  3. Add in declarations.d.ts file:

    declare module ‘jquery’;

    declare module ‘jquery-mask-plugin’;

But when I try to compile app, I got a Error:

Runtime Error
Cannot find module "jquery"

In tsconfig file:

  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [
    "module": "es2015",
    "moduleResolution": "node",
    "sourceMap": true,
    "target": "es5"
  "include": [
  "exclude": [
  "compileOnSave": false,
  "atom": {
    "rewriteTsconfig": false

What is wrong?

If you describe your actual goal, I bet somebody here can help you achieve it using Angular instead of jQuery.

I think that the problem is similar than this:

Sorry for my bad English. I just had to edit the post for any readability.
My actual is that I want to use jQuery in my project and use typed first party lib named jquery-mask-plugin. I was read the documentation for it, but I got a Error in declarations file.

I was tried this solution it is not the same and not solved my problem. I think if you will follow my steps you will get the same Error.

Have you looked at angular2-text-mask?

Sure. It is works fine but, not for my case. I need to give to my users any chance to set any mask on field with phone.
It can be:
+7 (999)999-99-99
and etc.
So it must be what ever they want.

angular2-text-mask can only use fixed masks. That’s why I want to use other libs. Do you can help me?