Skip to content

chore: remove unused directionality provider #7998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/cdk/bidi/directionality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ import {
EventEmitter,
Injectable,
Optional,
SkipSelf,
Inject,
InjectionToken,
} from '@angular/core';
import {DOCUMENT} from '@angular/platform-browser';


export type Direction = 'ltr' | 'rtl';
Expand Down Expand Up @@ -52,16 +50,3 @@ export class Directionality {
}
}
}

/** @docs-private */
export function DIRECTIONALITY_PROVIDER_FACTORY(parentDirectionality, _document) {
return parentDirectionality || new Directionality(_document);
}

/** @docs-private */
export const DIRECTIONALITY_PROVIDER = {
// If there is already a Directionality available, use that. Otherwise, provide a new one.
provide: Directionality,
deps: [[new Optional(), new SkipSelf(), Directionality], [new Optional(), DOCUMENT]],
useFactory: DIRECTIONALITY_PROVIDER_FACTORY
};
8 changes: 1 addition & 7 deletions src/cdk/bidi/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

export {
Directionality,
DIRECTIONALITY_PROVIDER_FACTORY,
DIRECTIONALITY_PROVIDER,
DIR_DOCUMENT,
Direction,
} from './directionality';
export {Directionality, DIR_DOCUMENT, Direction} from './directionality';
export {Dir} from './dir';
export * from './bidi-module';