I want to import jQuery in an Angular 5 project using TypeScript 2.8.1. I follow Ervin Llojku solution but this does not the trick :
Install jquery with npm
npm install --save jqueryInstall jquery with npm
npm install --save-dev @types/jqueryAdd scripts to .angular-cli.json
"apps": [{ ... "scripts": [ "../node_modules/jquery/dist/jquery.min.js", ], ... }]
I also try to add these imports in app.module.ts or in component :
import * as $ 'jquery';
Whatever I try TypeScript compiler throws this error :
Error:(7, 15) TS2497: Module ''jquery'' resolves to a non-module entity and cannot be imported using this construct.