@page "/"
@using Data.Models.Interfaces
@using Data.Models
@inject IBlogApi _api
@foreach (var p in posts)
{
- @p.Title
}
@code {
protected List posts = new List();
protected override async Task OnInitializedAsync()
{
posts = await _api.GetBlogPostsAsync(10, 0);
await base.OnInitializedAsync();
}
}