in Angular material progress spinner component we can actually set size by setting diameter. I want to know if there is an option to make this diameter responsive so it based on window size.
<mat-progress-spinner [diameter]=24> </mat-progress-spinner>
what I would like to have is:
<mat-progress-spinner [diameter]="some-relative-size"> </mat-progress-spinner>
2
Answers
You can just declare a variable in your TS file based on the window ?
You can create a directive, that adapts to the resize of the screen, but honestly, this should be done simply using
media queries
:Stackblitz Demo
Instead of complicated angular code.
Stackblitz Demo