Posted 30 April 2018, 7:00 am EST
Hi,
I am using aspnet core web app project with angular template within VS2017 and add wijmo into the project using npm. A simple run would produce error : Prerendering failed because of error: ReferenceError: window is not defined.
I am also using webpack with server side rendering. of course ‘window’ won’t be there but it’s being used by wijmo library. Do you have fix for this or a way around it? Other forums suggested putting conditional statement around the code to bypass window but it woulnd’t make sense to make change to your code base.
I am putting this inside the appshared.module.ts . moving them to app.browser.ts then the app doesn’t see the import at all.
Please advise.
Thanks
import { WjGridModule, WjFlexGrid, WjFlexGridColumn, WjFlexGridCellTemplate } from ‘wijmo/wijmo.angular2.grid’;
and
declarations: [ WjPopup,
WjAutoComplete,
WjComboBox,
WjInputDate,
WjInputNumber,
WjInputMask,
WjListBox