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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Angular 4 universal: window is not defined

Thread ID:

Created:

Updated:

Platform:

Replies:

132555 May 20,2017 10:02 AM UTC Apr 9,2018 12:59 PM UTC JavaScript - EJ 2 7
loading
Tags: General
j.nord
Asked On May 20, 2017 10:02 AM UTC

Hi,

with Angular 4 universal we get follow error:

window is not defined ->

Client\dist\main-server.js:28960:119)
at window.ej.window.Syncfusion

Is it possible to use your component under angular 4 universal?

Example project: https://github.com/MarkPieszak/aspnetcore-angular2-universal

Regards

j.nord

Abinaya Subbiah [Syncfusion]
Replied On May 22, 2017 12:51 PM UTC

Hi Jürgen Nordholz, 

The support incident has been created under your account and we have discussed your query in that. Please log on to our support website to check for further updates.  


Regards,  
Abinaya S  


Joe
Replied On September 4, 2017 07:50 AM UTC

Hi Jürgen Nordholz, 

The support incident has been created under your account and we have discussed your query in that. Please log on to our support website to check for further updates.  


Regards,  
Abinaya S  


Hi,


I have followed below thread but the error still exists, any idea?

https://www.syncfusion.com/forums/130365/microsoft-aspnetcore-spatemplates


NodeInvocationException: Prerendering failed because of error: ReferenceError: window is not defined
at Object.<anonymous> (C:\Users\xxx\Documents\Visual Studio 2017\Projects\aspnetcore-angular2-universal-master\ClientApp\dist\main-server.js:125:119)
at window.ej.window.Syncfusion (C:\Users\xxx\Documents\Visual Studio 2017\Projects\aspnetcore-angular2-universal-master\ClientApp\dist\main-server.js:124:37)


Regards,

Joe


Abinaya Subbiah [Syncfusion]
Replied On September 6, 2017 11:28 AM UTC

Hi Joe, 

Thanks for contacting Syncfusion support. 

We have analyzed the issue “window is not defined” , the issue caused due to window, document and DOM manipulations are implemented in jQuery which is required to render Essential Studio for JavaScript (EJS1) Angular components. The root cause of  the issue is accessing window, document and DOM not supported in Angular universal, since we are not able to integrate our Essential JavaScript 1 for Angular components into Universal application.  

For you kind information, we rolled out beta release of our Essential Studio for JavaScript 2 components which is fully, built on top of TypeScript, which doesn’t need of any external dependencies like jQuery. We consider the feature Angular Universal support in our EJS2 suite, which will be included in our upcoming releases. For now the following components are available for use. 
  
  • Chart
  • Grid
  • Button
  • Calendar
  • NumericTextBox
  • TextBoxes
  • ListView
  • Dialog
  • Toolbar
  • Tooltip
   
You can start using above controls using following getting started document 


Demo application is available in the following location 


Please let us know if you need further assist on this.  

Regards, 
Abinaya S 



Joe
Replied On September 7, 2017 10:21 AM UTC

Hi Joe, 

Thanks for contacting Syncfusion support. 

We have analyzed the issue “window is not defined” , the issue caused due to window, document and DOM manipulations are implemented in jQuery which is required to render Essential Studio for JavaScript (EJS1) Angular components. The root cause of  the issue is accessing window, document and DOM not supported in Angular universal, since we are not able to integrate our Essential JavaScript 1 for Angular components into Universal application.  

For you kind information, we rolled out beta release of our Essential Studio for JavaScript 2 components which is fully, built on top of TypeScript, which doesn’t need of any external dependencies like jQuery. We consider the feature Angular Universal support in our EJS2 suite, which will be included in our upcoming releases. For now the following components are available for use. 
  
  • Chart
  • Grid
  • Button
  • Calendar
  • NumericTextBox
  • TextBoxes
  • ListView
  • Dialog
  • Toolbar
  • Tooltip
   
You can start using above controls using following getting started document 


Demo application is available in the following location 


Please let us know if you need further assist on this.  

Regards, 
Abinaya S 



Hi,


Thanks for your prompt reply, but the grid component seems not work in my project using ej2-ng-grids. 

Any advice on what's wrong with my current settings would be appreciated.


https://github.com/JosephTsang/aspnetcore-angular2-universal-master


Best Regards,

Joe


Sridhar S [Syncfusion]
Replied On September 11, 2017 06:35 AM UTC

Hi Joe,  

Currently Essential JS 2 don’t have support for Angular Universal. This support will be available in our Upcoming Essential Studio Volume 4 release.  

Please share the details if did you faced any issue while integrating Essential JS 2 Grid in to an angular application on client side? 

Thanks,  
Sridhar S 


chetan
Replied On April 6, 2018 07:10 AM UTC

Hi Jürgen Nordholz, 

The support incident has been created under your account and we have discussed your query in that. Please log on to our support website to check for further updates.  


Regards,  
Abinaya S  


Hi,


I have followed below thread but the error still exists, any idea?

https://www.syncfusion.com/forums/130365/microsoft-aspnetcore-spatemplates


NodeInvocationException: Prerendering failed because of error: ReferenceError: window is not defined
at Object.<anonymous> (C:\Users\xxx\Documents\Visual Studio 2017\Projects\aspnetcore-angular2-universal-master\ClientApp\dist\main-server.js:125:119)
at window.ej.window.Syncfusion (C:\Users\xxx\Documents\Visual Studio 2017\Projects\aspnetcore-angular2-universal-master\ClientApp\dist\main-server.js:124:37)


Regards,

Joe


dsadsadsa

Saranya Murugasamy [Syncfusion]
Replied On April 9, 2018 12:59 PM UTC

Hi Jurgen, 
Kindly let us know if you have any technical queries with Syncfusion Products, We are here to assist you as always. 
Regards, 
Saranya Murugasamy 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;