Material Dialog is opened in the same window instead of Modal
Bug, feature request, or proposal:
I have upgraded my material dependency from alpha to beta version and when i perform the user operation to open a dialog, it is getting showed on the same screen instead of Modal.
What is the expected behavior?
Request should open new modal
What is the current behavior?
Currently it is opening in same window instead of modal
Below is my typescript code when opening a modal. let config = new MdDialogConfig(); config.viewContainerRef = this.viewContainerRef; this.dialogRef = this.dialog.open(ComponentA, config); this.dialogRef.componentInstance.ObjDetails = rowObj;
Here Row Obj is the result from the clicked row which opens the new modal
@vibingopal you can make that a block of code by putting ```ts (code here) ```
I would say try not using viewContainerRef
try something like
let config = new MdDialogConfig();
this.dialogRef = this.dialog.open(ComponentA, config);
Hi Mac,
I tried with your option and still the dialoge is opening in the same window instead of as modal.
:/ maybe it is a bug. can you create a plunkr?
here is a starting template https://plnkr.co/edit/vpTaIAdIJnjd7ngFG2Ea?p=preview
Same issue here ! I'll try to replicate in plunker. Running on : "@angular/material": "^2.0.0-beta.2",
Sounds like you're missing a theme, but there's not really enough information to be sure. Feel free to open a new issue with more information or a reproduction.
That was for me indeed the problem !
Added to index.html and now it works !
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.