Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

I've installed ng2-datetime and I get the errors below? #193

Open
zs1843 opened this issue Sep 8, 2017 · 9 comments
Open

I've installed ng2-datetime and I get the errors below? #193

zs1843 opened this issue Sep 8, 2017 · 9 comments

Comments

@zs1843
Copy link

zs1843 commented Sep 8, 2017

_20170908133313
you said I can add vendor.ts in folder ng2-datetime/src , the example, but I don't think this is a best way, for my teammate need to use it, too.
So, is there any solution to set a global $ ,by webpack for example?

@eivindr
Copy link

eivindr commented Sep 14, 2017

Try npm install @types/jquery --save-dev and then add import 'jquery'; to your app.module.ts.

@zs1843
Copy link
Author

zs1843 commented Sep 18, 2017

Thank you, I've done it another way.

@as2081
Copy link

as2081 commented Sep 28, 2017

I have the same errors, I installed the @types/jquery but how do you import jquery when it is not a module? @eivindr
Also if you could say how you solved this another way that would be great @zs1843 :)

Thanks

@eivindr
Copy link

eivindr commented Sep 29, 2017

@as2081 In your app.module.ts, add import 'jquery';

@zs1843
Copy link
Author

zs1843 commented Sep 29, 2017

@as2081 I have a timepiker component custom-made width my teammates, and you can also find another repository, for jquery, you can also add import * as $ from 'jquery' in your component.

@as2081
Copy link

as2081 commented Sep 29, 2017

@eivindr @zs1843 importing jquery gets rid of the errors when I reload the app it just stops working, do you have any idea why the jquery does this?
Thanks for your help!
image

@eivindr
Copy link

eivindr commented Sep 29, 2017

@as2081 Maybe related to mozilla/source-map#247

@zs1843
Copy link
Author

zs1843 commented Sep 30, 2017

@as2081 Maybe something undefined

@zs1843
Copy link
Author

zs1843 commented Sep 30, 2017

@as2081 Oh, our Chinese National Day is comming, good luck, man.

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

No branches or pull requests

3 participants