components icon indicating copy to clipboard operation
components copied to clipboard

Material Dialog is opened in the same window instead of Modal

Open vibingopal opened this issue 9 years ago • 7 comments

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 avatar Apr 06 '17 21:04 vibingopal

@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);

M-a-c avatar Apr 06 '17 21:04 M-a-c

Hi Mac,

I tried with your option and still the dialoge is opening in the same window instead of as modal.

vibingopal avatar Apr 07 '17 14:04 vibingopal

:/ maybe it is a bug. can you create a plunkr?

here is a starting template https://plnkr.co/edit/vpTaIAdIJnjd7ngFG2Ea?p=preview

M-a-c avatar Apr 07 '17 17:04 M-a-c

Same issue here ! I'll try to replicate in plunker. Running on : "@angular/material": "^2.0.0-beta.2",

TobiasVdb avatar Apr 08 '17 14:04 TobiasVdb

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.

jelbourn avatar Apr 09 '17 00:04 jelbourn

That was for me indeed the problem !
Added to index.html and now it works !

TobiasVdb avatar Apr 09 '17 17:04 TobiasVdb

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.