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 {
2929 TemplatePortal ,
3030} from '@angular/cdk/portal' ;
3131import { Observable , Subject } from 'rxjs' ;
32- import { AriaLivePoliteness } from '@angular/cdk/a11y' ;
32+ import { _IdGenerator , AriaLivePoliteness } from '@angular/cdk/a11y' ;
3333import { Platform } from '@angular/cdk/platform' ;
3434import { AnimationEvent } from '@angular/animations' ;
3535import { MatSnackBarConfig } from './snack-bar-config' ;
3636
37- let uniqueId = 0 ;
38-
3937/**
4038 * Internal component that wraps user-provided snack bar content.
4139 * @docs -private
@@ -109,7 +107,7 @@ export class MatSnackBarContainer extends BasePortalOutlet implements OnDestroy
109107 _role ?: 'status' | 'alert' ;
110108
111109 /** 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-' ) ;
113111
114112 constructor ( ...args : unknown [ ] ) ;
115113
You can’t perform that action at this time.
0 commit comments