This article provides a step-by-step introduction to configure Essential JS 2 setup, build and publish a simple .NET Core Razor Slider Component web application using the Visual Studio 2019.
The official prerequisites to create and run an ASP.NET Core Razor Components on Windows environment are described in the .NET Core Razor components documentation website.
Choose File > New > Project… in the Visual Studio menu bar.
Make sure .NET Core and ASP.NET Core 3.0 are selected at the top.
Choose the Blazor template and change the application name, and then click OK.
Now, add the Syncfusion.EJ2.AspNet.Core.RazorComponents NuGet package to the new application by using the NuGet Package Manager. Right-click the project and select Manage NuGet Packages.
Search the Syncfusion.EJ2.AspNet.Core.RazorComponents keyword in the Browse tab and install Syncfusion.EJ2.AspNet.Core.RazorComponents NuGet package in the application.
The Essential JS 2 package will be included in the project, after the installation process is completed.
Open ~/_Imports.razor file and import the
@using Syncfusion.EJ2.RazorComponents @using Syncfusion.EJ2.RazorComponents.Inputs
Add the client-side resources through CDN or local npm package in the
<head> element of the ~/wwwroot/index.html page.
Now, add the Syncfusion Essential JS 2 Slider component in any web page (cshtml) in the
Pages folder. For example, the Slider component is added in the ~/Pages/Index.cshtml page.
<EjsSlider ID="Slider" Value="30"></EjsSlider>
After successful compilation of your application, simply press
F5 to run the application.
Output be like the below.