I want to display image from icon library in Blazor component.
The path is:
wwwroot/lib/@icon/open-iconic/icons/account-login.svg
But @ is a special character in Blazor.
Quoting Razor syntax:
To escape an @ symbol in Razor markup, use a second @ symbol:
<p>@@Username</p>
The code is rendered in HTML with a single @ symbol:
<p>@Username</p>
Just add another @ symbol. So your exmaple:
wwwroot/lib/@@icon/open-iconic/icons/account-login.svg
will render as:
wwwroot/lib/@icon/open-iconic/icons/account-login.svg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With