Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1b5f334

Browse files
committed
refactor(cdk/overlay): remove unnecessary providers
Removes a couple of providers that aren't necessary anymore after the switch to standalone.
1 parent 124184a commit 1b5f334

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed

‎src/cdk/overlay/overlay-directives.ts

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,7 @@ import {
3939
FlexibleConnectedPositionStrategy,
4040
FlexibleConnectedPositionStrategyOrigin,
4141
} from './position/flexible-connected-position-strategy';
42-
import {
43-
createRepositionScrollStrategy,
44-
RepositionScrollStrategy,
45-
ScrollStrategy,
46-
} from './scroll/index';
42+
import {createRepositionScrollStrategy, ScrollStrategy} from './scroll/index';
4743

4844
/** Default set of positions for the overlay. Follows the behavior of a dropdown. */
4945
const defaultPositionList: ConnectedPosition[] = [
@@ -462,25 +458,3 @@ export class CdkConnectedOverlay implements OnDestroy, OnChanges {
462458
this.open = false;
463459
}
464460
}
465-
466-
/**
467-
* @docs-private
468-
* @deprecated No longer used, will be removed.
469-
* @breaking-change 21.0.0
470-
*/
471-
export function CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(
472-
overlay: unknown,
473-
): () => RepositionScrollStrategy {
474-
const injector = inject(Injector);
475-
return () => createRepositionScrollStrategy(injector);
476-
}
477-
478-
/**
479-
* @docs-private
480-
* @deprecated No longer used, will be removed.
481-
* @breaking-change 21.0.0
482-
*/
483-
export const CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {
484-
provide: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,
485-
useFactory: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,
486-
};

‎src/cdk/overlay/overlay-module.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@ import {PortalModule} from '../portal';
1111
import {ScrollingModule} from '../scrolling';
1212
import {NgModule} from '@angular/core';
1313
import {Overlay} from './overlay';
14-
import {
15-
CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER,
16-
CdkConnectedOverlay,
17-
CdkOverlayOrigin,
18-
} from './overlay-directives';
14+
import {CdkConnectedOverlay, CdkOverlayOrigin} from './overlay-directives';
1915

2016
@NgModule({
2117
imports: [BidiModule, PortalModule, ScrollingModule, CdkConnectedOverlay, CdkOverlayOrigin],
2218
exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule],
23-
providers: [Overlay,CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER],
19+
providers: [Overlay],
2420
})
2521
export class OverlayModule {}
2622

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /