Queries |
Response |
I was wondering if the documentation found here has been looked at in a while:
We are running Angular 7+ and this particular app already runs the v1 Syncfusion components.
These directions are very hard to follow and it feels like there are missing pieces because I can't get it to work. I have a Dashboard component created that imports Easing, the web.all.min, and the dashboardViewer:
import 'app/ej-dashboard/jquery.easing.min.js';
import 'syncfusion-javascript/Scripts/ej/web/ej.web.all.min';
import 'app/ej-dashboard/ej.dashboardViewer.all.min.js'; |
For creating Angular 7 sample, the structure will differ with documentation when latest version arrives. For generic solution to create Angular sample, we have planned to add a KB to embed the Dashboard in the Angular 7 application without using web pack. It will be published by 10th June 2019. We have embedded the Dashboard in the Angular 7 sample without using the webpack. Please find the sample in the below link for your reference.
|
These import links work for me but as soon as I serve, I immediately get an "Out of Memory" error and the server crashes. This seems to be due to the ej.web.all.min file. |
We have ensured that the Dashboard is rendering fine in the Angular 7 sample without any memory issue. Please refer the attached sample. If you still face the issue please share the sample you have created to investigate the issue. |
I am also declaring the components in my app module. APP_COMPONENTS is spread in the app.module declarations section. Note that I am using the spread operator on EJ_DASHBOARDVIEWER_COMPONENTS because that is missing in the docs. Without it, the final array would look like [AppComponent, [SYNC_COMPONENTS]]:
import { EJ_DASHBOARDVIEWER_COMPONENTS }from '../ej-dashboard/web.all';
export const APP_COMPONENTS = [
...components,
...EJ_DASHBOARDVIEWER_COMPONENTS,
];
Are there new steps to get this working in Angular or can someone please re-visit them? |
We have ensured the Documentation contains information to import the EJ_DASHBOARDVIEWER_COMPONENTS in the dashboard.module.ts. Please refer the below link
As we mentioned, we will publish the Knowledge Base article to embed the Dashboard in the Angular 7 application without using web pack by 10th June 2019. However you can refer the attached Angular 7 Sample to resolve the issue. |
import '../../../node_modules/syncfusion-javascript/Scripts/ej/common/ej.core.min'; |
Suggestion |
Response | |
Any future developers running into this same issue:
dashboard.component.ts
import 'jsrender';
import 'SCRIPT_PATH/customwidgetcore.min.js';
import 'SCRIPT_PATH/ej.dashboardViewer.all.min.js';
jQuery and easing are imported in angular.json rather than in dashboard.component.ts |
You can refer the jQuery and jQuery.easing in angular.json inside the script module.
However to add the reference of jQuery and jQuery.easing in the dashboard.component.ts file needs the below code snippet in the app.component.ts file
| |
A note about the css file: There are multiple relative import links in the css so make sure you catch them all and that they live in the same path. This includes all font imports, images, and the themes folder. If you do not include these extra files, Angular CLI will throw import errors and it will not compile. Here are some path examples to watch out for:
'../../fonts/roboto-regular.ttf'
'images/white_triangle_arrow.png'
'../common-images/ejicons.eot?#iefix-dzszjm' |
You don’t need to import the font and image files separately. In your angular.json, file add the reference of ej.dashboardViewer.all.min.css file alone. In the ej.dashhboardViewer.all.min.css file we have internally imported the fonts,images and themes
Even after adding the reference of theej.dashboardViewer.all.min.css file in the angular.json if you face any error in the compiling means share the screenshot of the error to investigate further. |