Something weird is happening with my ASP.NET MVC project. I started implementing some razor components for a section of the page that has a lot of UI change with user clicks.
This is a snippet inside my _ScopeTabPartial.razor, it is in folder /Views/Request/_ScopeTabPartial.razor:
<div class="s6 switch-installation horizontal"><label class="switch"><input type="checkbox" id="new-install-switch" checked="@SharedState.ScopeTabViewModel.IsNewInstallation" @onchange="@(UpdateIsNewInstallationState)"><span class="padding">New installation @SharedState.ScopeTabViewModel.IsNewInstallation</span> @* @bind="@SharedState.ScopeTabViewModel.IsNewInstallation"*@</label></div>It does not work, Google Chrome says:
But when I use:
<div class="s6 switch-installation horizontal"><label class="switch"><input type="checkbox" id="new-install-switch" checked="@SharedState.ScopeTabViewModel.IsNewInstallation" @onchange="@(UpdateIsNewInstallationState)"><span class="padding">New installation @SharedState.ScopeTabViewModel.IsNewInstallation</span> </label></div>it works!
Now, my issue is that I wanted to use
@bind="@SharedState.ScopeTabViewModel.IsNewInstallation"and bind= is not behaving as supposed. Any help?
I only found this : https://github.com/dotnet/aspnetcore/issues/20980
