I'm using Angular2, and I'd like to include jQuery.
systemjs.config.js
(function (global) {
System.config({
paths: {
'npm:': 'node_modules/',
'jquery': "//code.jquery.com/jquery-2.1.4.min.js"
},
meta: {
bootstrap: {
deps: ['jquery']
}
},
.....
}
In app.module.ts, I got the error : Cannot find the module 'jquery' when I put :
import $ from 'jquery';
I try it using map instead of paths, but the same result..
node_modulesdirectory by default. Did you install jQuery withnpm?jqueryand throws an error. With jquery it's actually more complicated and you need to install also its typings. If you're using TypeScript 2.0 you can use npmjs.com/package/@types/jquery