I\'m testing typescript with jquery, but when I compile the test.ts file, it always gives me an error indicating: Cannot find name \'$\'.
I\'ve already imported jquery &
I don't know if it helps but I solved the same issue for my datepicker.
First I installed jQuery with this command: npm install --save-dev @types/jquery
Then add the dependencies in your angular-cli.json file:
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.css",
"../node_modules/font-awesome/css/font-awesome.css",
"../node_modules/ng2-datetime/src/vendor/bootstrap-datepicker/bootstrap-datepicker3.min.css",
"styles.css"
]
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../node_modules/ng2-datetime/src/vendor/bootstrap-datepicker/bootstrap-datepicker.min.js"
]
I think adding the jQuery part might work out for you. Please let me know if it works.