From the course: Blazor: Getting Started
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Respond to an event in a subcomponent - Blazor Tutorial
From the course: Blazor: Getting Started
Challenge: Respond to an event in a subcomponent
(upbeat music) - [Instructor] It's time for our first challenge. Let's take some of what we've learned in the chapter and put it into practice. The RayList component is currently waiting for the data service to update the RayList before it re-renders. But I would like the RayList to begin a loading animation as soon as the ray is cast by the right input component in case of a slow server connection. The loader can be hidden when the load completes. Use the bootstrap class spinner-border in a div on the RayList to indicate that the rays are being reloaded. Add an event to the RayInput that the RayList can bind to to know when to show the loader. For bonus points, start the loading animation whenever the component loads and not just when a ray is cast. Hide it any time the RayList update is complete.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Basic Blazor components4m 46s
-
(Locked)
Routing in Blazor4m 59s
-
(Locked)
Dependency injection and services with Blazor8m 42s
-
(Locked)
Blazor component life cycle8m 3s
-
(Locked)
Data binding and events with Blazor3m 47s
-
(Locked)
Binding between Blazor components3m 22s
-
(Locked)
Child content in a Blazor component4m 21s
-
(Locked)
Blazor layouts3m 38s
-
(Locked)
Challenge: Respond to an event in a subcomponent1m 1s
-
(Locked)
Solution: Respond to an event in a subcomponent1m 57s
-
-
-
-
-
-