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
close icon

New ASP.NET Core Angular application can't find "ej"

I'm trying to upgrade my project, and it can't find the "ej" namespace. I've tried again with a brand new project to test this, and it still happens (see attached zip file).
To create this project, I followed these steps:
Then I added the types:
npm install --save-dev @types/ej.web.all
and also added the types to tsconfig.json.

After doing the above, I've added "gridData: ej.DataManager;" to the home.component.ts. This is to simulate the usage that I have in my real application...

Visual Studio Code can find it, and if I F5 on "ej" it takes me to the type definition correctly.
Unfortunately, it can't find it when I try to build with "dotnet run"...

Do you know how I can fix this?
Thanks,
Dan

Attachment: SyncFusionTest_344ca3f9.zip

7 Replies

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team November 15, 2019 02:01 PM UTC

Hi Dan,

Before proceeding further with this, please confirm us whether you are using the EJ1 Grid Component or EJ2 Grid Component.

Regards,
Seeni Sakthi Kumar S


DC Dan Clarke November 15, 2019 02:06 PM UTC

I don't know. My grids look like this if that helps?



I would like to be using whatever the latest is. Although, it depends on how much of a "re-write" we're talking?

Thanks,
Dan


FS Farveen Sulthana Thameeztheen Basha Syncfusion Team November 18, 2019 04:05 PM UTC

Hi Dan,  

Query: error TS2304: Cannot find name 'ej'.  

We suspect that the issue occurred due to typings not installed properly in the sample. In some system environment typings will not be installed properly, so please ensure typings are installed properly in the application as like the below screenshot.    
     
      
            
To install Syncfusion JavaScript and Angular 2 components run below commands from sample’s root folder.   
     
npm install --save @types/ej.web.all     
      
After run the above command please ensure that typings has been installed properly.  Still faced issue, please get back to us with further details. 


Regards, 
Farveen sulthana T  



DC Dan Clarke November 22, 2019 11:36 AM UTC

Hi. I've done all that, and the type does appear in my node modules. See attached video recording which shows the issue. Remember that this is a brand new project following along from your document linked in my first post.

Attachment: SyncfusionTypesIssue_3863b73a.zip


RR Rajapandi Ravi Syncfusion Team November 26, 2019 12:57 PM UTC

Hi Dan, 

Sorry for the inconvenience caused. 

We suspect that the issue occurred due to conflict between EJ1 and Ej2 in the sample. You have been refering EJ2 documentation for EJ1 Grid control. So we suggest you to follow the below EJ1 documentation to achieve your requirement. Please refer the below sample, documentation and screenshot for more information. 



Screenshot: 

 

Regards, 
Rajapandi R


DC Dan Clarke December 6, 2019 05:18 PM UTC

Thank you, I now have this working.


FS Farveen Sulthana Thameeztheen Basha Syncfusion Team December 9, 2019 04:46 AM UTC

Hi Dan,  

Thanks for your reply. We are glad to know that your reported problem has been resolved. Please get back to us if you need any further assistance. 

Regards, 
Farveen sulthana T 


Loader.
Live Chat Icon For mobile
Up arrow icon