Razor currently allows Razor control flow directives like @if and @foreach inside the @code block of a component.
This behaviour should probably be either be disallowed, or produce a dianostic warning/error because it blurs the distinction between Razor syntax and C#.
Razor currently allows Razor control flow directives like
@ifand@foreachinside the@codeblock of a component.This behaviour should probably be either be disallowed, or produce a dianostic warning/error because it blurs the distinction between Razor syntax and C#.