Skip to content

Commit 54aad6e

Browse files
committed
fix(material/snack-bar): remove deprecated factory functions
Removes factory functions that we had marked as deprecated for v21. These functions aren't necessary since we switched to standalone. BREAKING CHANGE: * `MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY` has been removed.
1 parent 4ec00ba commit 54aad6e

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

goldens/material/snack-bar/index.api.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ export const MAT_SNACK_BAR_DATA: InjectionToken<any>;
3737
// @public
3838
export const MAT_SNACK_BAR_DEFAULT_OPTIONS: InjectionToken<MatSnackBarConfig<any>>;
3939

40-
// @public @deprecated
41-
export function MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY(): MatSnackBarConfig;
42-
4340
// @public
4441
export class MatSnackBar implements OnDestroy {
4542
constructor(...args: unknown[]);

src/material/snack-bar/snack-bar.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,12 @@ import {ComponentPortal, TemplatePortal} from '@angular/cdk/portal';
3333
import {takeUntil} from 'rxjs/operators';
3434
import {_animationsDisabled} from '../core';
3535

36-
/**
37-
* @docs-private
38-
* @deprecated No longer used, will be removed.
39-
* @breaking-change 21.0.0
40-
*/
41-
export function MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY(): MatSnackBarConfig {
42-
return new MatSnackBarConfig();
43-
}
44-
4536
/** Injection token that can be used to specify default snack bar. */
4637
export const MAT_SNACK_BAR_DEFAULT_OPTIONS = new InjectionToken<MatSnackBarConfig>(
4738
'mat-snack-bar-default-options',
4839
{
4940
providedIn: 'root',
50-
factory: MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY,
41+
factory: () => new MatSnackBarConfig(),
5142
},
5243
);
5344

0 commit comments

Comments
 (0)