I need to implement jquery-ui draggable inside an angular2 project.
I have managed to drag and drop from external by using angular-cli scripts.
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/moment/min/moment.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js",
"../node_modules/fullcalendar/dist/fullcalendar.min.js",
"../node_modules/fullcalendar-scheduler/dist/scheduler.min.js",
"assets/js/jquery-ui.min.js"
],
But the problem is it's increases the scripts bundle. I am using jQuery inside the application
import * as $ from "jquery";
Am using fullcalender which will be act as droppable. Fullcalender supports only jQuery draggable. it's possible to import fullcalender inside an component. But the imported jQuery an dthe global jQuery does have some how different context. so the drop not working.
Currently I am using like
declare var jQuery: any;
for global.
What is proper way to import jQuery draggable inside angular2 project?