Closed wernerva closed 5 years ago
@wernerva , this probably fixed in my fork as I had similar errors, you can use it in your project just by reference my fork instead of npm version in your package,json, like this:
...
"dependencies": {
...
"ng2-bootstrap-modal": "https://github.com/Sky4CE/ng2-bootstrap-modal/tarball/v.1.0.2",
...
}
...
@Sky4CE, thanks for that. Why don't you log a pull request if you've fixed the issue?
@wernerva , because this lib no more maintained by the creator, unfortunately.
Oh. Great.
I have created an issue. fix for that error is simple: use aplpicationRef.components[0] and don't reference on componentRoots or somethong like that
Hi, I saw the post which is saying that "@wernerva , because this lib no more maintained by the creator, unfortunately." I have questions .
can we use this dialog service in our projects? Do we have any alternative for this?
var componentRootNode = componentRef.hostView.rootNodes[0]; // this is undefined, does anyone know the fix? this.container.appendChild(componentRootNode);
function DialogService(resolver, applicationRef, injector, config) { this.resolver = resolver; this.applicationRef = applicationRef; debugger this.injector = injector; this.container = config && config.container; }
After looking into it the injector is null, which in turn creates this error.
@Sky4CE Thanks a lot man.
@Sky4CE this is not working with angular6, giving rxjs/oberable error, i think you should rxjs-compat
I duplicated the demo code but when I run it I get:
ERROR TypeError: Cannot read property '0' of undefined at DialogService.createDialogHolder (dialog.service.js:52) at DialogService.addDialog (dialog.service.js:33)
What gives?