Last active
January 12, 2019 21:14
-
-
Save Mirch/c7ac29af2f87baae6a94763937dcb95f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inject HttpClient Http | |
@functions { | |
IEnumerable<FeedElement> posts; | |
private async Task<IEnumerable<FeedElement>> GetData() | |
{ | |
var data = await Http.GetJsonAsync<IEnumerable<FeedElement>>("sample-data/feed.json"); | |
return data; | |
} | |
public class FeedElement | |
{ | |
public string Title { get; set; } | |
public string Content { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment