@@ -8,8 +8,9 @@ import {MatProgressSpinner, MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS} from './progre
8
8
describe ( 'MDC-based MatProgressSpinner' , ( ) => {
9
9
beforeEach ( waitForAsync ( ( ) => {
10
10
TestBed . configureTestingModule ( {
11
- imports : [ MatProgressSpinnerModule , CommonModule ] ,
12
- declarations : [
11
+ imports : [
12
+ MatProgressSpinnerModule ,
13
+ CommonModule ,
13
14
BasicProgressSpinner ,
14
15
IndeterminateProgressSpinner ,
15
16
ProgressSpinnerWithValueAndBoundMode ,
@@ -297,8 +298,7 @@ describe('MDC-based MatProgressSpinner', () => {
297
298
it ( 'should be able to set a default diameter' , ( ) => {
298
299
TestBed . resetTestingModule ( )
299
300
. configureTestingModule ( {
300
- imports : [ MatProgressSpinnerModule ] ,
301
- declarations : [ BasicProgressSpinner ] ,
301
+ imports : [ MatProgressSpinnerModule , BasicProgressSpinner ] ,
302
302
providers : [
303
303
{
304
304
provide : MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS ,
@@ -318,8 +318,7 @@ describe('MDC-based MatProgressSpinner', () => {
318
318
it ( 'should be able to set a default stroke width' , ( ) => {
319
319
TestBed . resetTestingModule ( )
320
320
. configureTestingModule ( {
321
- imports : [ MatProgressSpinnerModule ] ,
322
- declarations : [ BasicProgressSpinner ] ,
321
+ imports : [ MatProgressSpinnerModule , BasicProgressSpinner ] ,
323
322
providers : [
324
323
{
325
324
provide : MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS ,
@@ -339,8 +338,7 @@ describe('MDC-based MatProgressSpinner', () => {
339
338
it ( 'should be able to set a default color' , ( ) => {
340
339
TestBed . resetTestingModule ( )
341
340
. configureTestingModule ( {
342
- imports : [ MatProgressSpinnerModule ] ,
343
- declarations : [ BasicProgressSpinner ] ,
341
+ imports : [ MatProgressSpinnerModule , BasicProgressSpinner ] ,
344
342
providers : [
345
343
{
346
344
provide : MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS ,
@@ -403,24 +401,42 @@ describe('MDC-based MatProgressSpinner', () => {
403
401
} ) ;
404
402
} ) ;
405
403
406
- @Component ( { template : '<mat-progress-spinner></mat-progress-spinner>' } )
404
+ @Component ( {
405
+ template : '<mat-progress-spinner></mat-progress-spinner>' ,
406
+ standalone : true ,
407
+ imports : [ MatProgressSpinnerModule , CommonModule ] ,
408
+ } )
407
409
class BasicProgressSpinner { }
408
410
409
- @Component ( { template : '<mat-progress-spinner [strokeWidth]="strokeWidth"></mat-progress-spinner>' } )
411
+ @Component ( {
412
+ template : '<mat-progress-spinner [strokeWidth]="strokeWidth"></mat-progress-spinner>' ,
413
+ standalone : true ,
414
+ imports : [ MatProgressSpinnerModule , CommonModule ] ,
415
+ } )
410
416
class ProgressSpinnerCustomStrokeWidth {
411
417
strokeWidth : number ;
412
418
}
413
419
414
- @Component ( { template : '<mat-progress-spinner [diameter]="diameter"></mat-progress-spinner>' } )
420
+ @Component ( {
421
+ template : '<mat-progress-spinner [diameter]="diameter"></mat-progress-spinner>' ,
422
+ standalone : true ,
423
+ imports : [ MatProgressSpinnerModule , CommonModule ] ,
424
+ } )
415
425
class ProgressSpinnerCustomDiameter {
416
426
diameter : number ;
417
427
}
418
428
419
- @Component ( { template : '<mat-progress-spinner mode="indeterminate"></mat-progress-spinner>' } )
429
+ @Component ( {
430
+ template : '<mat-progress-spinner mode="indeterminate"></mat-progress-spinner>' ,
431
+ standalone : true ,
432
+ imports : [ MatProgressSpinnerModule , CommonModule ] ,
433
+ } )
420
434
class IndeterminateProgressSpinner { }
421
435
422
436
@Component ( {
423
437
template : '<mat-progress-spinner [value]="value" [mode]="mode"></mat-progress-spinner>' ,
438
+ standalone : true ,
439
+ imports : [ MatProgressSpinnerModule , CommonModule ] ,
424
440
} )
425
441
class ProgressSpinnerWithValueAndBoundMode {
426
442
mode = 'indeterminate' ;
@@ -430,6 +446,8 @@ class ProgressSpinnerWithValueAndBoundMode {
430
446
@Component ( {
431
447
template : `
432
448
<mat-spinner [color]="color"></mat-spinner>` ,
449
+ standalone : true ,
450
+ imports : [ MatProgressSpinnerModule , CommonModule ] ,
433
451
} )
434
452
class SpinnerWithColor {
435
453
color : string = 'primary' ;
@@ -438,6 +456,8 @@ class SpinnerWithColor {
438
456
@Component ( {
439
457
template : `
440
458
<mat-progress-spinner value="50" [color]="color"></mat-progress-spinner>` ,
459
+ standalone : true ,
460
+ imports : [ MatProgressSpinnerModule , CommonModule ] ,
441
461
} )
442
462
class ProgressSpinnerWithColor {
443
463
color : string = 'primary' ;
@@ -447,6 +467,8 @@ class ProgressSpinnerWithColor {
447
467
template : `
448
468
<mat-progress-spinner value="25" diameter="37" strokeWidth="11"></mat-progress-spinner>
449
469
` ,
470
+ standalone : true ,
471
+ imports : [ MatProgressSpinnerModule , CommonModule ] ,
450
472
} )
451
473
class ProgressSpinnerWithStringValues { }
452
474
@@ -455,6 +477,8 @@ class ProgressSpinnerWithStringValues {}
455
477
<mat-progress-spinner mode="indeterminate" [diameter]="diameter"></mat-progress-spinner>
456
478
` ,
457
479
encapsulation : ViewEncapsulation . ShadowDom ,
480
+ standalone : true ,
481
+ imports : [ MatProgressSpinnerModule , CommonModule ] ,
458
482
} )
459
483
class IndeterminateSpinnerInShadowDom {
460
484
diameter : number ;
@@ -469,6 +493,8 @@ class IndeterminateSpinnerInShadowDom {
469
493
}
470
494
` ,
471
495
encapsulation : ViewEncapsulation . ShadowDom ,
496
+ standalone : true ,
497
+ imports : [ MatProgressSpinnerModule , CommonModule ] ,
472
498
} )
473
499
class IndeterminateSpinnerInShadowDomWithNgIf {
474
500
@ViewChild ( MatProgressSpinner , { read : ElementRef } )
@@ -477,5 +503,9 @@ class IndeterminateSpinnerInShadowDomWithNgIf {
477
503
diameter : number ;
478
504
}
479
505
480
- @Component ( { template : '<mat-spinner mode="determinate"></mat-spinner>' } )
506
+ @Component ( {
507
+ template : '<mat-spinner mode="determinate"></mat-spinner>' ,
508
+ standalone : true ,
509
+ imports : [ MatProgressSpinnerModule , CommonModule ] ,
510
+ } )
481
511
class SpinnerWithMode { }
0 commit comments