Reputation: 81
When I don't use @ and just use {}, the scope breaks.
When I use @{} for the inline code, the scope works, but it errors because of the @
Any suggestions? Sure looks like a glitch to me. Go Blazor!
Here's a third screenshot where the brackets aren't breaking scope.
Upvotes: 0
Views: 182
Reputation: 81
it actually worked with no brackets. The brackets were messing with the scope, when I thought they were required for in line code.
Upvotes: 1
Reputation: 273244
Nothing to do with Blazor.
The var ticket
is scoped by the { }
block. The if(ticket == null)
part is outside that block.
If you had posted the code as text and not as pictures I would have fixed it here.
Upvotes: 1