Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add notes.md #201

Merged
merged 2 commits into from
Sep 5, 2023
Merged
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
18 changes: 18 additions & 0 deletions src/notes.md
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)