I am creating an ionic 2 app. I am a new angular 2 developer, so sorry if I miss some things. I want to include jQuery and other js files to page components.
I used this method:
import { Component } from '@angular/core';
import '../../assets/js/jquery-2.1.1.js';
import '../../assets/js/prog-bar.js';
import '../../assets/js/myApp.js';
import { NavController } from 'ionic-angular';
okay it loaded the files but it gives me error
Uncaught ReferenceError: $ is not defined.
So I tried to include jquery lib :
npm install @types/jquery --save-dev
but I don`t know what to do next. how to use Jquery lib in my app in a good way, please don't tell me to add the script tag to the index.html page because it is being removed every time I rerun the app.