Skip to content
New issue

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

Lazy load assembly article updates #31049

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions aspnetcore/blazor/components/class-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,18 @@ To provide `Component1`'s `my-component` CSS class, link to the library's styles

:::moniker-end

## Make routable components available from the RCL

To make routable components in the RCL available for direct requests, the RCL's assembly must be added to the app's router.

Open the app's `App` component (`App.razor`). Add or update the `AdditionalAssemblies` parameter of the `<Router>` tag to include the RCL's assembly. In the following example, the `ComponentLibrary.Component1` component is used to discover the RCL's assembly.

```razor
AdditionalAssemblies="new[] { typeof(ComponentLibrary.Component1).Assembly }"
```

For more information, see <xref:blazor/fundamentals/routing#route-to-components-from-multiple-assemblies>.

## Create an RCL with static assets in the `wwwroot` folder

An RCL's static assets are available to any app that consumes the library.
Expand Down
Loading