1

I have a little problem there, i have a component that works. Its a basic component writing 'Hello World' for now that i use in a "angular-quickstart" app.

The thing is, i want my component to be able to use JQuery. On its own, it is fine. i imported jquery via typings and referenced it.

But i can't have access to it when i import my custom component from the "angular-quickstart". I import my component but there is not $ (Jquery) variable.

Is there any way to do this ? Or should i import JQuery via typings in my app as well ?

EDIT: i've been looking at this (https://github.com/thelgevold/angular-2-samples/tree/e7c7190a288a3c364701e8a04b9a3639359eb8e7) for half an hour and it seems like i should import jquery AND my component ...

Pardeep Jain
  • 84,110
  • 37
  • 165
  • 215
julio
  • 2,762
  • 4
  • 22
  • 34
  • read this answer about using Jquery with Angular2. hope this will hint to solve your problem or either post your code it would be better to solve your problem to others. – Pardeep Jain Feb 14 '16 at 13:09
  • opps sorry forgot to post link of the answer. link is here now http://stackoverflow.com/a/35392033/5043867 – Pardeep Jain Feb 15 '16 at 07:29
  • Yeah i've already done that. What i don't know is use this component outside without re-importing JQuery ... – julio Feb 15 '16 at 07:31
  • here this refer to `this` keyword or this component ? – Pardeep Jain Feb 15 '16 at 07:39

0 Answers0