Skip to content

Instantly share code, notes, and snippets.

@fredgdaley2
Last active October 31, 2019 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fredgdaley2/17b59377412841a6b4584e2a74e179f0 to your computer and use it in GitHub Desktop.
Save fredgdaley2/17b59377412841a6b4584e2a74e179f0 to your computer and use it in GitHub Desktop.
Blazor Component - ForEach
@typeparam TItem
@foreach (var item in Items)
{
@ItemTemplate(item)
}
@code {
[Parameter] public RenderFragment<TItem> ItemTemplate { get; set; }
[Parameter] public IEnumerable<TItem> Items { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment