Open nsabarisri6 opened 7 years ago
Facing the same issue in v3.0.1.
The overlay.service.d.ts file does not contain the field 'defaultViewContainer' which obviously causes the error.
i got that error too, and still get error when add modal.overlay.defaultViewContainer = vcRef;
==> Property 'defaultViewContainer' does not exist on type 'Overlay'.
the same error
same error here as well
hey i just fixed by included to main template and remove modal.overlay.defaultViewContainer = vcRef; or overlay.defaultViewContainer = vcRef;
@thekeldeo Can you explain what to "included to main template" ?
here is my app.component.ts:
@Component({
selector: 'app',
styleUrls: ['./app.component.scss'],
template: `
<main [class.menu-collapsed]="isMenuCollapsed" baThemeRun>
<span defaultOverlayTarget></span>
<toaster-container></toaster-container>
<div class="additional-bg"></div>
<router-outlet></router-outlet>
</main>
`
})
@thekeldeo Thank you ~ but mine still not working . Maybe because I've used module lazyloading ??
@thekeldeo Unfortunately not working for me either.
.open() on a modal instance causes ~20s ideling in the whole view.
It's not working for me either. Any other fixes?
@nsabarisri6 have you tried to reproduce the error on plunker?
I found the solution for this problem here, provided by romanchuk: https://github.com/shlomiassaf/angular2-modal/issues/278
I have created a Github repo in which I applied this solution (Git clone it and run npm run ng serve from the root directory of the project): https://github.com/ronh73/modalng2 (because I use Angular-CLI/Webpack, I can not use plunker)
The key thing here is to remove the line modal.overlay.defaultViewContainer = vcRef; from the constructor and instead of that add some code to the app.module.ts.
Unfortunately I can not add bootstrap to my solution.
error TS2339: Property 'defaultViewContainer' does not exist on type 'Overlay'.
91 overlay.defaultViewContainer = vcRef;
Hi,
I am trying to import angular2-modal in my project.
But I get error saying
Property 'defaultViewContainer' does not exist on type 'Modal
I also followed your earlier workaround and included
<span defaultOverlayTarget></span>
But still no use. I get the same error. When I used,
modal.overlay.defaultViewContainer = vcRef;
==> I can see the modal, but not the content.(This idea was mentioned by another guy in the same thread)
Reference:
https://github.com/shlomiassaf/angular2-modal/issues/210
Please help me.
Thanks, Sabarisri N