File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import {
32
32
ANIMATION_MODULE_TYPE ,
33
33
inject ,
34
34
} from '@angular/core' ;
35
+ import { _IdGenerator } from '@angular/cdk/a11y' ;
35
36
import { Subject } from 'rxjs' ;
36
37
import { filter , startWith , take } from 'rxjs/operators' ;
37
38
import { MatAccordionBase , MatAccordionTogglePosition , MAT_ACCORDION } from './accordion-base' ;
@@ -42,9 +43,6 @@ import {MatExpansionPanelContent} from './expansion-panel-content';
42
43
/** MatExpansionPanel's states. */
43
44
export type MatExpansionPanelState = 'expanded' | 'collapsed' ;
44
45
45
- /** Counter for generating unique element ids. */
46
- let uniqueId = 0 ;
47
-
48
46
/**
49
47
* Object that can be used to override the default options
50
48
* for all of the expansion panels in a module.
@@ -145,7 +143,7 @@ export class MatExpansionPanel
145
143
_portal : TemplatePortal ;
146
144
147
145
/** ID for the associated header element. Used for a11y labelling. */
148
- _headerId = ` mat-expansion-panel-header-${ uniqueId ++ } ` ;
146
+ _headerId : string = inject ( _IdGenerator ) . getId ( ' mat-expansion-panel-header-' ) ;
149
147
150
148
constructor ( ...args : unknown [ ] ) ;
151
149
You can’t perform that action at this time.
0 commit comments