Blazored / Toast

A JavaScript free toast library for Blazor and Razor Component applications
https://blazored.github.io/Toast/
MIT License
654 stars 90 forks source link

not working correctly in Razor components #5

Closed uwefms closed 5 years ago

uwefms commented 5 years ago

I cannot run Toaster in server-side blazor.

This is the csproj file of the client.app: `

netstandard2.0 7.3

`

I tried:

` @page "/counter" @inject IToastService toastService

Counter

Current count: @currentCount

@functions { int currentCount = 0;

void IncrementCount()
{
    currentCount++;

    toastService.ShowToast(ToastLevel.Info, "Now at " + currentCount.ToString());
}

}

` In the counter component.

toaster_rc_

chrissainty commented 5 years ago

Hi @uwefms, I think this is actually a known limitation in the first preview of Razor Components. Static assets are not being included from component libraries. I think you're not getting the CSS loaded from Blazored Toast by the looks of it.

You can read more here.

uwefms commented 5 years ago

Thought so - so waiting for the next preview ...