We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a Tasks Page that should display tasks. I want to separate each task and display each one in a component
This is Blazor component representing a task row
@inherits ViewComponentBase <h6>@TaskModel.Oid</h6> @code { [Parameter] public TaskModel TaskModel { get; set; } } public class TaskRowComponentController : ControllerComponentBase<TaskRowComponent> { }
@inherits ViewComponentBase
<h6>@TaskModel.Oid</h6>
@code {
[Parameter] public TaskModel TaskModel { get; set; }
}
public class TaskRowComponentController : ControllerComponentBase<TaskRowComponent> { }
The tasks page
@inherits ViewComponentBase @foreach (TaskModel task in Tasks) { } @code { public List<TaskModel> Tasks { get; set; } = new List<TaskModel>(); }
@foreach (TaskModel task in Tasks) {
public List<TaskModel> Tasks { get; set; } = new List<TaskModel>();
using Palermo.BlazorMvc; namespace App.MauiBrazor.Pages.TaskPages { [Route("/Tasks")] public class TasksPageController : ControllerComponentBase { private RestClient _restClient = new RestClient(); private List<TaskModel> tasks { get; set; } protected override async Task OnInitializedAsync() { tasks = await _restClient.CTTasks(); if(tasks != null) { View.Tasks = this.tasks; StateHasChanged(); } } } }
using Palermo.BlazorMvc;
namespace App.MauiBrazor.Pages.TaskPages { [Route("/Tasks")] public class TasksPageController : ControllerComponentBase { private RestClient _restClient = new RestClient();
private List<TaskModel> tasks { get; set; } protected override async Task OnInitializedAsync() { tasks = await _restClient.CTTasks(); if(tasks != null) { View.Tasks = this.tasks; StateHasChanged(); } } }
This approach doesn't work.. What should I do ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a Tasks Page that should display tasks.
I want to separate each task and display each one in a component
This is Blazor component representing a task row
The tasks page
This approach doesn't work.. What should I do ?
The text was updated successfully, but these errors were encountered: