Skip to content

Commit 1547a77

Browse files
crisbetoandrewseguin
authored andcommitted
chore: remove unused directionality provider (#7998)
Removes the `DIRECTIONALITY_PROVIDER` since it isn't being used anywhere. This seems to be a remnant of the old approach to dealing with directionality.
1 parent 58627c4 commit 1547a77

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

src/cdk/bidi/directionality.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ import {
1010
EventEmitter,
1111
Injectable,
1212
Optional,
13-
SkipSelf,
1413
Inject,
1514
InjectionToken,
1615
} from '@angular/core';
17-
import {DOCUMENT} from '@angular/platform-browser';
1816

1917

2018
export type Direction = 'ltr' | 'rtl';
@@ -55,16 +53,3 @@ export class Directionality {
5553
}
5654
}
5755
}
58-
59-
/** @docs-private */
60-
export function DIRECTIONALITY_PROVIDER_FACTORY(parentDirectionality, _document) {
61-
return parentDirectionality || new Directionality(_document);
62-
}
63-
64-
/** @docs-private */
65-
export const DIRECTIONALITY_PROVIDER = {
66-
// If there is already a Directionality available, use that. Otherwise, provide a new one.
67-
provide: Directionality,
68-
deps: [[new Optional(), new SkipSelf(), Directionality], [new Optional(), DOCUMENT]],
69-
useFactory: DIRECTIONALITY_PROVIDER_FACTORY
70-
};

src/cdk/bidi/public-api.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
export {
10-
Directionality,
11-
DIRECTIONALITY_PROVIDER_FACTORY,
12-
DIRECTIONALITY_PROVIDER,
13-
DIR_DOCUMENT,
14-
Direction,
15-
} from './directionality';
9+
export {Directionality, DIR_DOCUMENT, Direction} from './directionality';
1610
export {Dir} from './dir';
1711
export * from './bidi-module';
1812

0 commit comments

Comments
 (0)