Q:

How do you consume a Blazor component library?

0

This code will help you to understand how to consume a Blazor component library.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

You can consume a library in either of two ways:

  • Full name with namespace
  • Using Razor’s @using directive

If the MyComponentLib is the component library and MyComponent is the component name, those are consumed like in the following.

Option1:

<h1>Hello, world!</h1>

Welcome to your new app.

<MyComponentLib.MyComponent />

Option2:

@using MyComponent

<h1>Hello, world!</h1>

Welcome to your new app.

<MyComponent />

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now