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 @@ -29,13 +29,11 @@ import {
29
29
TemplatePortal ,
30
30
} from '@angular/cdk/portal' ;
31
31
import { Observable , Subject } from 'rxjs' ;
32
- import { AriaLivePoliteness } from '@angular/cdk/a11y' ;
32
+ import { _IdGenerator , AriaLivePoliteness } from '@angular/cdk/a11y' ;
33
33
import { Platform } from '@angular/cdk/platform' ;
34
34
import { AnimationEvent } from '@angular/animations' ;
35
35
import { MatSnackBarConfig } from './snack-bar-config' ;
36
36
37
- let uniqueId = 0 ;
38
-
39
37
/**
40
38
* Internal component that wraps user-provided snack bar content.
41
39
* @docs -private
@@ -109,7 +107,7 @@ export class MatSnackBarContainer extends BasePortalOutlet implements OnDestroy
109
107
_role ?: 'status' | 'alert' ;
110
108
111
109
/** Unique ID of the aria-live element. */
112
- readonly _liveElementId = ` mat-snack-bar-container-live-${ uniqueId ++ } ` ;
110
+ readonly _liveElementId = inject ( _IdGenerator ) . getId ( ' mat-snack-bar-container-live-' ) ;
113
111
114
112
constructor ( ...args : unknown [ ] ) ;
115
113
You can’t perform that action at this time.
0 commit comments