feat(bottom-sheet): switch to providedIn syntax

This commit is contained in:
Jeremy Elbourn
2018-05-23 17:30:48 -07:00
committed by Andrew Seguin
parent a21a4f2d1d
commit 59554c4b63
3 changed files with 234 additions and 197 deletions
+224 -187
View File
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 {}
+10 -8
View File
@@ -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;