19 lines
919 B
C#
19 lines
919 B
C#
using BlazorSyncfusionCrm.Client;
|
|
using Microsoft.AspNetCore.Components.Web;
|
|
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
|
using Syncfusion.Blazor;
|
|
|
|
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
|
builder.RootComponents.Add<App>("#app");
|
|
builder.RootComponents.Add<HeadOutlet>("head::after");
|
|
|
|
builder.Services.AddHttpClient("BlazorSyncfusionCrm.ServerAPI", client => client.BaseAddress = new Uri(builder.HostEnvironment.BaseAddress));
|
|
|
|
// Supply HttpClient instances that include access tokens when making requests to the server project
|
|
builder.Services.AddScoped(sp => sp.GetRequiredService<IHttpClientFactory>().CreateClient("BlazorSyncfusionCrm.ServerAPI"));
|
|
builder.Services.AddSyncfusionBlazor();
|
|
|
|
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("MTcyMTQ0NkAzMjMxMmUzMTJlMzMzNVNvVmlFLy9zUk5TTTlURGZIeTRCelpRR2FTQ1NXTXRrSGpNcVJKMzRES1E9");
|
|
|
|
await builder.Build().RunAsync();
|