We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Using Single control Javascript

Hi.
There is a way to use the single control javascript files instead of the ej.web.all.min.js, without the require.js?
Does any single javascript file includes the needed controls (eg the graid with the Doropdown, toolbar etc)
I'd like to use with MVC Helpers (so I cannot use the require.js), and in that way but sometimes the 8 MB complete  javascript is long to download the first time.

     Thanks in advance

     Andrea Perazzolo


3 Replies

DT Dhivyalakshmi Thirumurugan Syncfusion Team June 10, 2016 03:07 PM UTC

Hi Andrea, 
 
Thanks for contacting Syncfusion support. 
 
We can use the single control javascript file instead of the ej.web.all.min.js. For that we should use Custom Script Generator (CSG) tool which is used to create a single file that packs together only the required scripts and CSS files together. Please select the specific control script file you need and generate the ej.widget.all file using custom script generator tool.  
 
Kindly check this link for Custom Script Generator tool UG reference: http://help.syncfusion.com/js/custom-script-generator 
 
Please let us know if you need any further assistance. 
 
Regards, 
Dhivyalakshmi. 
 



AP Andrea Perazzolo June 10, 2016 03:19 PM UTC

HI, thanks for the reply, but this is only a part of the solution for me.
If I need different controls in different pages, for all with this solution for every page I need to load all the controls javascript (only the first page, then the others have the javascript cached).
I have seen that in the installation folder the javascript file for the single controls are present,even minified.
There is a way, without the require.js to load the needed javascript for each control seamlessly or do I need to specify all explicitely
For example if I have a grid, I need to load the ejgrid.js and the ejToolbar.js, ej.datamanager, and all.
There isn't a way to simplify the process?

This will also  resolve a problem I always have in Visual Studio that when I have a javascript error inside the ej.web.all.js file. The debugger almost block Visual Studio for many minutes trying to reach the correct position in the file.

      Thanks in advance

     Andrea Perazzolo


DT Dhivyalakshmi Thirumurugan Syncfusion Team June 14, 2016 12:33 PM UTC

 Hi Andrea,   
  
Thanks for the update.   
  
To refer the scripts individually we have only two ways which is given below.   
  
1. We can achieve it on using CSG Tool.   
2. We can refer the in the specific page required scripts individually like the below code.   
   
<code>   
        <script src="/scripts/web/ej.dropdownlist.min.js" type="text/javascript"></script>   
</code>   
  
  
Currently we have only the above two solutions. If there is some other way to do this effectively means, we will check that and let you know sooner.   
  
Please let us know if you have any queries.   
  
Regards,   
Dhivyalakshmi.   


Loader.
Up arrow icon