@page "/"
@page "/dashboard"
@using WebSharpRSS.Models;
@using SharpRss.Models
@using SharpRss.Services
@inject FeedStateContainer _stateContainer;
@inject SyndicationService _service;
@if (_loading)
{
}
else
{
@foreach (CategoryModel category in _categories)
{
}
}
@code {
bool _loading = true;
HashSet _categories = new HashSet();
protected override async void OnInitialized()
{
await _service.GetCategoriesAsync().ContinueWith(task =>
{
_categories = task.Result;
_loading = false;
});
}
}