Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to setup MatBlazor so that controls are styled?

$
0
0

Trying to setup and use MatBlazor components in new .net 5 blazor webassembly. But, controls are not styled.

I followed the instructions at https://www.matblazor.com/.Installed MatBlazor

dotnet add package MatBlazor

Added using to _imports

@using MatBlazor

added lines to index.html

<script src="_content/MatBlazor/dist/matBlazor.js"></script><link href="_content/MatBlazor/dist/matBlazor.css" rel="stylesheet" />

registered service in program.cs

services.AddMatBlazor();

added MatPortalHost to app.razor

<MatPortalHost></MatPortalHost>

Added simple button

<MatButton> mat button </MatButton>

But my button has no styling. I tried a MatTextField too; no styling.

enter image description here

Did I miss a step? Are the setup instructions correct?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>