Challenge: Blazor Parameters
Test yourself by passing parameters to Razor components.
We'll cover the following
Overview
Using the project below, perform the tasks highlighted in the Requirements section.
Requirements
In the project setup below, we have a Counter
Razor component that can accept any arbitrary HTML:
We need to make the following changes to it:
When the button is clicked, the number is incremented by a configurable amount and not by 1.
The
Index
component sets this number to 10.When we use the
Counter
component inside theIndex
component, the footer of theCounter
component should be represented by a heading element with the textEvery click increments the count by 10
.
Get hands-on with 1400+ tech skills courses.