date-time-picker
date-time-picker copied to clipboard
Open a Picker as a Dialog not working
ERROR - OwlDialogContainerComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: Class constructor BasePortalOutlet cannot be invoked without 'new' at new OwlDialogContainerComponent (dialog-container.component.js:40) at createClass (core.js:27864) at createDirectiveInstance (core.js:27673) at createViewNodes (core.js:38309) at createRootView (core.js:38181) at callWithDebugContext (core.js:39710) at Object.debugCreateRootView [as createRootView] (core.js:38947) at ComponentFactory_.create (core.js:26815) at ComponentFactoryBoundToModule.create (core.js:22779) at ViewContainerRef_.createComponent (core.js:26971)
Now how I fixed this - In dialoge-container.js
For OwlDialogContainerComponent function -
I made one change in OwlDialogContainerComponent function
function OwlDialogContainerComponent(changeDetector, elementRef, focusTrapFactory, document) {
var _this = **this || _super.call(this);**
_this.changeDetector = changeDetector;
_this.elementRef = elementRef;
_this.focusTrapFactory = focusTrapFactory;
_this.document = document;
_this.ariaLabelledBy = null;
_this.animationStateChanged = new EventEmitter();
_this.isAnimating = false;
_this.state = 'enter';
_this.params = {
x: '0px',
y: '0px',
ox: '50%',
oy: '50%',
scale: 0
};
_this.elementFocusedBeforeDialogWasOpened = null;
return _this;
}
Now can anyone give me a solution to fix this permanently because I am not able to use this in production?
Thank you
Done some research - https://github.com/bugsnag/bugsnag-js/issues/505
@rmn-kmr did you resolved this. I am facing the same issue.
Class constructor BasePortalOutlet cannot be invoked without 'new' at new OwlDialogContainerComponen
facing this issue while using [pickerMode]="'dialog'" in owl-date-time tag
kindly resolve this if any one get the solution please post it here
change the "target" to "es5" in your project's tsconfig.json file. Fixed the issue for me Its broken when "target" is set to "es2015" which is the Angular 8 default.
change the "target" to "es5" in your project's tsconfig.json file. Fixed the issue for me Its broken when "target" is set to "es2015" which is the Angular 8 default.
This worked for me.
Thank you!
can this be fixed to work with es2015 as the target? es5 didn't fix for me
change the "target" to "es5" in your project's tsconfig.json file. Fixed the issue for me Its broken when "target" is set to "es2015" which is the Angular 8 default.
thank you, this workes for me
change the "target" to "es5" in your project's tsconfig.json file. Fixed the issue for me Its broken when "target" is set to "es2015" which is the Angular 8 default.
This worked for me "@angular/cli": "~8.3.13",