diff --git a/components/action-sheet/action-sheet.service.ts b/components/action-sheet/action-sheet.service.ts index c2557dd3..ab6ac4d2 100644 --- a/components/action-sheet/action-sheet.service.ts +++ b/components/action-sheet/action-sheet.service.ts @@ -56,7 +56,7 @@ export class ActionSheet extends PopupService { static _open(props: ActionSheetOptions) { setTimeout(() => { - ActionSheet.comRef = ActionSheet.showPopup(ActionSheetComponent); + ActionSheet.comRef = ActionSheet.showPopup('ActionSheetComponent', ActionSheetComponent); ActionSheet.comRef.instance.option = props; }, 0); } diff --git a/components/core/services/popup.service.ts b/components/core/services/popup.service.ts index 5b2f282e..e9bc4844 100644 --- a/components/core/services/popup.service.ts +++ b/components/core/services/popup.service.ts @@ -16,6 +16,7 @@ export class PopupService { } static showPopup( + componentName, component, childInjector?: Injector, hasBackdrop?: boolean, @@ -28,9 +29,10 @@ export class PopupService { PopupService.overlayRef.backdropClick().subscribe(() => { PopupService.hidePopup(); }); - PopupService.currentServiceName = component.name; + PopupService.currentServiceName = componentName; + console.log(component, childInjector); const comRef = PopupService.overlayRef.attach(new ComponentPortal(component, undefined, childInjector)); - PopupService.serviceArray.push({key: component.name, value: PopupService.overlayRef}); + PopupService.serviceArray.push({key: componentName, value: PopupService.overlayRef}); return comRef; } diff --git a/components/modal/modal.service.ts b/components/modal/modal.service.ts index 83a7f63c..8686ea3a 100644 --- a/components/modal/modal.service.ts +++ b/components/modal/modal.service.ts @@ -65,7 +65,7 @@ export class Modal extends PopupService { } ]); setTimeout(() => { - Modal.modalRef = Modal.showPopup(ModalServiceComponent, childInjector); + Modal.modalRef = Modal.showPopup('ModalServiceComponent', ModalServiceComponent, childInjector); }, 0); } diff --git a/components/picker/picker.service.ts b/components/picker/picker.service.ts index 55fae084..7a2592f8 100644 --- a/components/picker/picker.service.ts +++ b/components/picker/picker.service.ts @@ -34,7 +34,7 @@ export class Picker extends PopupService { useValue: options } ]); - Picker.showPopup(PickerComponent, childInjector); + Picker.showPopup('PickerComponent', PickerComponent, childInjector); } static hidePicker(): void {