-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Using Assets in package | ||
|
||
When working with static assets in a Blazor package project(bootstap icons, images, styles, ...), for proper function need to be reference like: `_content/{PACKAGE ID}/{PATH AND FILE NAME}`. | ||
|
||
For example: | ||
|
||
~~~ HTML | ||
<img src="_content/AXOpen.Data.Blazor/bootstrap-icons-1.8.2/download.svg" /> | ||
~~~ | ||
|
||
NOT only direct reference, as this approach may not function correctly when you're utilizing assets outside of the default project. | ||
|
||
~~~ HTML | ||
<img src="/bootstrap-icons-1.8.2/download.svg" /> | ||
~~~ | ||
|
||
For more information, refer Microsoft documentation: | ||
[Microsoft docs](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/class-libraries?view=aspnetcore-6.0&tabs=visual-studio#create-an-rcl-with-static-assets-in-the-wwwroot-folder) |