My assumption is that my css is not correct, but alas I cannot figure this out.
<div *ngIf="loading">
<md-progress-circle mode="indeterminate" color="warn">Loading...</md-progress-circle>
</div>
<md-list>
<md-list-item *ngFor="let incident of incidents">
<h3 md-line> {{name}} </h3>
<p md-line>
<span>{{date}} > </span>
<span>{{text}}</span>
</p>
</md-list-item>
</md-list>
To use spinners we need to simply use <mat-spinner> tag. They are two types of progress bars like determinate and indeterminate. Indeterminate the spinner will not rotate but in the case of indeterminate, the spinner rotates continuously. For determinate type spinners, we need to give value in order to display them.
You need to make sure you're using a theme for @angular/material.
From the getting started guide:
Include the core and theme styles:
This is required to apply all of the core and theme styles to your application. You can either use a pre-built theme, or define your own custom theme.
- See the theming guide for instructions.
I've found using @angular/material without a theme to work only some of the time. Text inputs work but radiobuttons, checkboxes - and it appears the spinners - require a theme to work properly.
As noted in the quote, you can either use one of the provided themes (there's currently 6 provided) or create your own. The provided themes can be included in your css using @import('~@angular/material/core/theming/prebuilt/<theme>.css')
.
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