sirbradwick
sirbradwick

Reputation: 81

blazor inclide code blocks glitching @{} errors then {} scope errors

When I don't use @ and just use {}, the scope breaks.

not using '@{}'

When I use @{} for the inline code, the scope works, but it errors because of the @

using '@{}'

Any suggestions? Sure looks like a glitch to me. Go Blazor!

Here's a third screenshot where the brackets aren't breaking scope. enter image description here

Upvotes: 0

Views: 182

Answers (2)

sirbradwick
sirbradwick

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.

no brackets for the win

Upvotes: 1

Henk Holterman
Henk Holterman

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

Related Questions