mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
feat(bottom-sheet): switch to providedIn syntax
This commit is contained in:
committed by
Andrew Seguin
parent
a21a4f2d1d
commit
59554c4b63
Generated
+224
-187
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,6 @@ import {PortalModule} from '@angular/cdk/portal';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatCommonModule} from '@angular/material/core';
|
||||
import {MatBottomSheet} from './bottom-sheet';
|
||||
import {MatBottomSheetContainer} from './bottom-sheet-container';
|
||||
|
||||
|
||||
@@ -25,6 +24,5 @@ import {MatBottomSheetContainer} from './bottom-sheet-container';
|
||||
exports: [MatBottomSheetContainer, MatCommonModule],
|
||||
declarations: [MatBottomSheetContainer],
|
||||
entryComponents: [MatBottomSheetContainer],
|
||||
providers: [MatBottomSheet],
|
||||
})
|
||||
export class MatBottomSheetModule {}
|
||||
|
||||
@@ -6,19 +6,21 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Overlay, OverlayConfig, OverlayRef} from '@angular/cdk/overlay';
|
||||
import {ComponentPortal, TemplatePortal, ComponentType, PortalInjector} from '@angular/cdk/portal';
|
||||
import {ComponentRef, TemplateRef, Injectable, Injector, Optional, SkipSelf} from '@angular/core';
|
||||
import {MatBottomSheetConfig, MAT_BOTTOM_SHEET_DATA} from './bottom-sheet-config';
|
||||
import {MatBottomSheetRef} from './bottom-sheet-ref';
|
||||
import {MatBottomSheetContainer} from './bottom-sheet-container';
|
||||
import {of as observableOf} from 'rxjs';
|
||||
import {Directionality} from '@angular/cdk/bidi';
|
||||
import {Overlay, OverlayConfig, OverlayRef} from '@angular/cdk/overlay';
|
||||
import {ComponentPortal, ComponentType, PortalInjector, TemplatePortal} from '@angular/cdk/portal';
|
||||
import {ComponentRef, Injectable, Injector, Optional, SkipSelf, TemplateRef} from '@angular/core';
|
||||
import {of as observableOf} from 'rxjs';
|
||||
import {MAT_BOTTOM_SHEET_DATA, MatBottomSheetConfig} from './bottom-sheet-config';
|
||||
import {MatBottomSheetContainer} from './bottom-sheet-container';
|
||||
import {MatBottomSheetModule} from './bottom-sheet-module';
|
||||
import {MatBottomSheetRef} from './bottom-sheet-ref';
|
||||
|
||||
|
||||
/**
|
||||
* Service to trigger Material Design bottom sheets.
|
||||
*/
|
||||
@Injectable()
|
||||
@Injectable({providedIn: MatBottomSheetModule})
|
||||
export class MatBottomSheet {
|
||||
private _bottomSheetRefAtThisLevel: MatBottomSheetRef<any> | null = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user