Skip to content

Commit 24932b6

Browse files
committed
fix(material/core): 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_DATE_LOCAL_FACTORY` has been removed.
1 parent b2c4df2 commit 24932b6

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

goldens/material/core/index.api.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ export const MAT_DATE_FORMATS: InjectionToken<MatDateFormats>;
154154
// @public
155155
export const MAT_DATE_LOCALE: InjectionToken<{}>;
156156

157-
// @public @deprecated
158-
export function MAT_DATE_LOCALE_FACTORY(): {};
159-
160157
// @public (undocumented)
161158
export const MAT_NATIVE_DATE_FORMATS: MatDateFormats;
162159

src/material/core/datetime/date-adapter.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,9 @@ import {Observable, Subject} from 'rxjs';
1212
/** InjectionToken for datepicker that can be used to override default locale code. */
1313
export const MAT_DATE_LOCALE = new InjectionToken<{}>('MAT_DATE_LOCALE', {
1414
providedIn: 'root',
15-
factory: MAT_DATE_LOCALE_FACTORY,
15+
factory: () => inject(LOCALE_ID),
1616
});
1717

18-
/**
19-
* @docs-private
20-
* @deprecated No longer used, will be removed.
21-
* @breaking-change 21.0.0
22-
*/
23-
export function MAT_DATE_LOCALE_FACTORY(): {} {
24-
return inject(LOCALE_ID);
25-
}
26-
2718
const NOT_IMPLEMENTED = 'Method not implemented';
2819

2920
/** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */

0 commit comments

Comments
 (0)