ej-angular2 icon indicating copy to clipboard operation
ej-angular2 copied to clipboard

angular 6 support. jQuery is not defined

Open hesampour opened this issue 6 years ago • 1 comments

Hi. there is no vendor.ts in angular 6 so how can I define jQuery globaly in the project?

As I searched we can just define jQuery in our components. I think its a good idea to use this method in your project instead of defining jQuery globaly.

1- Find JQuery (or any other package you want) from TypeSeach, then you will end up on this NPM package, install it:

npm install --save @types/jquery 2- Install JQuery itself:

npm install --save jquery 3- Anywhere you want to use JQuery, just Import type declaration file (.d.ts) into Angular app:

import * as $ from 'jquery';

hesampour avatar Sep 28 '18 06:09 hesampour

Hi @hesampour ,

Thanks for your interest in Syncfusion Products.

The Syncfusion JavaScript widgets need window.jQuery object to render the Angular components, since we need to import the jQuery in common across our application, before loading Syncfusion JavaScript widgets.

We have prepared a sample with latest version of Angular CLI and attached below, in which we have vendor.ts file to load the jQuery. Please find the environmental setup in the below screenshot.

cli cli-compile

Refer to the below getting-started link for more information.

https://help.syncfusion.com/angular/gettingstarted/getting-started-angular-cli

Sample

Please share more information about your environment setup and if you are using different combination of tools to render Syncfusion Angular components. It will help us to further analyze and assist you soon.

Thanks, Karthick T

karthickthangasamy avatar Oct 04 '18 04:10 karthickthangasamy