-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
In a new project, using server side template, I added the reference to BlazorExtensions storage (0.2.1), added the services.AddStorage() line to register the services. If I modify the counter example to this:
`@page "/counter"
@using Blazor.Extensions.Storage
@Inject SessionStorage sessionStorage
@Inject LocalStorage localStorage
Counter
Current count: @currentCount
<button class="btn btn-primary" @OnClick="IncrementCount">Click me
@code {
int currentCount = 0;
async void IncrementCount()
{
currentCount=await localStorage.GetItem<int>("counter");
currentCount++;
localStorage.SetItem("counter", currentCount).Wait();
}
}
`
I receive the error Could not find 'BlazorExtensions' in 'window'.
blazor.server.js is present in Sources when I enter in dev mode in chrome.
dotnet --version outputs 3.0.100-preview7-012821.
Is that correct?
KuraiAndras
Metadata
Metadata
Assignees
Labels
No labels