Hi Liutzuyi,
Thanks for contacting Syncfusion support.
We have checked with your query. We need to update the documentation content for rendering EJ components in ASP.NET Core in MAC device. We will modify our online documentation content and update it soon. For your convenience, we have listed steps to follow to successfully render EJ controls with latest version of VS Code using sample.csproj.
· Create a new folder(Sample) in your disk to create a project within it.
· Now, open your Terminal window and navigate to the folder created for project.
· Create new project by using command dotnet new mvc , .Net core project will be created in that folder.
· Now, open the folder in VS code.
· Open bower.json file and add the Syncfusion JavaScript version.
· Then open quick window to enter the >bower
command and press ‘Enter’ key, from the below list of suggestions select the bower install option to restored our scripts and CSS into your application wwwroot -> lib folder.
· Refer our Syncfusion package Syncfusion.EJ.AspNet.Core into your application to render our components. Please,visit the below link for details.
· Open the Sample.csproj file and include the Syncfusion.EJ.AspNet.Core assembly as depicted below in the code sample.
· Open _viewimports.cshtml file from view folder and add the following namespace for components references and Tag Helper support.
@addTagHelper *,Syncfusion.EJ
@using Syncfusion.JavaScript
· Open Terminal window and navigate to your project folder then execute the following command to restore the packages which are all specified in your Sample.csproj file.
· Now refer the necessary scripts and CSS files in your _layout.cshtml page as mentioned below link.
· Add ScriptManager to the bottom of the layout.cshtml page. The ScriptManager used to place our control initialization script in the page.
<ej-script-manager></ej-script-manager> |
· Now, you can render our Syncfusion components in any view Page. For example,
[Index.cshtml]
<ej-date-picker id="datepicker" value="@DateTime.Now"></ej-date-picker> |
· Finally, Run the project by execute below command and paste localhost:5000 in browser to view our rendered control.
We have also, attached the sample project below for your better understanding.
Regards,
Shameer Ali Baig S.