Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Import jQuery Ui Touch Punch in Angular #289

Open
hsuanweifu opened this issue Jul 26, 2017 · 2 comments
Open

How to Import jQuery Ui Touch Punch in Angular #289

hsuanweifu opened this issue Jul 26, 2017 · 2 comments

Comments

@hsuanweifu
Copy link

How do you import jquery ui in angular?

I have tried the following.

 "jquery": "^3.2.1",
 "jquery-ui": "^1.12.1",
 "jquery-ui-touch-punch": "^0.2.3",
import * as $ from "jquery";
import 'jquery-ui/ui/core';
import 'jquery-ui/ui/widget';
import 'jquery-ui/ui/widgets/mouse';
import 'jquery-ui/ui/widgets/draggable';
import 'jquery-ui/ui/widgets/selectable';
import 'jquery-ui-touch-punch';

Uncaught (in promise): ReferenceError: jQuery is not defined ReferenceError:

Thanks.

@flyingwip
Copy link

I get a different error : Property 'draggable' does not exist on type 'JQuery'.

@pratikgavas
Copy link

pratikgavas commented Dec 16, 2017

Any solution for this?

Hey, I found one workaround.
You can copy all the code of jquery-ui-touch-punch.js which is inside jQuery Function and paste it into constructor of ts file where you import jQuery. So you can access to draggable and droppable event.
Hope so it will help.
Thank you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants