MaterialPopupComponent constructor
MaterialPopupComponent(
- @Optional.new() @SkipSelf.new() PopupHierarchy _hierarchy,
- @Optional.new() @SkipSelf.new() MaterialPopupComponent parentPopup,
- @Attribute.new('role') String role,
- NgZone _ngZone,
- OverlayService _overlayService,
- DomService _domService,
- ZIndexer _zIndexer,
- @Inject.new(defaultPopupPositions) List<
RelativePosition> _defaultPreferredPositions, - @Inject.new(overlayRepositionLoop) bool _useRepositionLoop,
- @Inject.new(overlayViewportBoundaries) Box _viewportBoundaries,
- @Optional.new() PopupSizeProvider _popupSizeProvider,
- ChangeDetectorRef _changeDetector,
- ViewContainerRef _viewContainer,
- ElementRef elementRef,
Implementation
MaterialPopupComponent(
@Optional() @SkipSelf() this._hierarchy,
@Optional() @SkipSelf() MaterialPopupComponent parentPopup,
@Attribute('role') String role,
this._ngZone,
this._overlayService,
this._domService,
this._zIndexer,
@Inject(defaultPopupPositions) this._defaultPreferredPositions,
@Inject(overlayRepositionLoop) this._useRepositionLoop,
@Inject(overlayViewportBoundaries) this._viewportBoundaries,
@Optional() this._popupSizeProvider,
this._changeDetector,
this._viewContainer,
this.elementRef)
: this.role = role ?? 'dialog' {
// Close popup if parent closes.
if (parentPopup != null) {
_disposer
.addStreamSubscription(parentPopup.onClose.listen((_) => close()));
}
// Create the PopupRef for the ACX focus library.
_resolvedPopupRef = MaterialPopupRef(this);
}