Skip to content

Commit

Permalink
Add notes.md (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brano5 authored Sep 5, 2023
1 parent 10d8f80 commit a9e6c76
Showing 1 changed file with 18 additions and 0 deletions.
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)

0 comments on commit a9e6c76

Please # to comment.