Questions tagged [mat-dialog]
145 questions
0
votes
2 answers
mat dialog and a mat table shows a line below the heading
The mat-table in a mat dialog shows a line below the heading. Has any one faced this and how do I fix this?
Below is the code
dialog title
…
0
votes
0 answers
A div inside of a mat-dialog has to move over when opening the dialog, rather than being in the right place (already using position: absolute)
Inside an application I am developing, I have an Angular Material dialog that contains a mat-selection-list of companies and a mat-list of alphabetical characters that can be clicked on to jump to different alphabetical headers. My issue is that my…

Elliott Ives
- 11
- 1
0
votes
1 answer
how to disable validation for cancel button in angular
I have a submit and a cancel button in my dialogbox,
when i click on submit button the validatation works, but I want when i click on cancel button, form to be closed without need validation...Now when I click on cancel button validation fired and…

H Jafari
- 19
- 2
- 8
0
votes
2 answers
Angular mat-dialog-title and mat-dialog-actions not sticking
I am not sure what I am doing wrong here, but my dialog does not seem to be utilizing my sections. This is how I am laying out the dialog:
Stackblitz Example

Get Off My Lawn
- 34,175
- 38
- 176
- 338
0
votes
1 answer
How to disable all controls/clicks in background page when angular material dialog open
I'm using the angular material dialog (v7), we have editable cells in the dialog and in the below page as well we have editable cells like text area/text inputs.
When dialog open if I pressed ctrl+z then undo operation working in both dialog and…

Rams
- 2,141
- 5
- 33
- 59
0
votes
1 answer
How to remove the white background in the angular material dialog or ensure that the dialog fits parent component
I have written the code to display the angular modal dialog, but I don't know how to align it center and make it fit inside the parent component when screen is large I want it to be centered.
But what happens is that is overflows right and left with…

Andongwisye Mwamengo
- 179
- 2
- 9
0
votes
0 answers
How to convert data from Mat-Dialog as class object
I'm a beginner for angular 11, And I want to get data from Mat-Dialog .open() then convert as object of Goods class array to another component (ProductListComponent)
My interface class:
export interface Goods {
goodsId?: number;
…

Kantrakorn J
- 3
- 3
0
votes
2 answers
Angular Mat Dialog does not close
I have the unusual issue that my opened MatDialog component won't close in my Angular application. I don't use HTML as view but SVG in my calling component, which is handled a little bit different. Unfortunately I can't figure out what the problem…

rzett
- 193
- 2
- 16
0
votes
1 answer
How do I use dialogRef.afterClosed() if I don't want to pass any value to the subscribe(result =>{}
My situation is I want to open a dialog component, in which I pass a value from the main component, then after closing I just want to refresh the table in the main component, but without using any subscription or passing any value to the main…

Rahul
- 21
- 8
0
votes
1 answer
Can't pass data to mat dialog
I have a problem I need to pass an object to a mat-dialog. When I consult the value of the object, it is shown with all its properties, the problem occurs when I need to access the properties, they are shown as undefined.
Main…

Andrés
- 43
- 5
0
votes
2 answers
How to access Custom service and dialog from custom confirm decorator
How can I access to that singleton instances inside angular dependencies injections?
I want to write custom decorator for confirm dialog using this way.
Decorator implementation:
import {NgplDialogConfirmModel, NgplDialogService} from…

Yoan Asdrubal Quintana Ramírez
- 328
- 1
- 10
0
votes
1 answer
[Angular 11-12][Jasmine] Problem to test afterClosed() suscription from MatDialog
I'm trying to spy a call service to know if have been called after matdialog is closed.
But I have this error..
TypeError: Cannot read property 'close' of undefined
But if I not try to close the dialog, the code inside "afterClosed()" subscription,…

DavidB
- 1
- 3
0
votes
1 answer
Angular Code Question - Inject data into mat-dialog-actions
I need to get some data to a method in Angular. Here is the code:
I need to get data into addNpi() just like editNpi(data) below
Is there any way to do this? Thanks!

Rod Nichols
- 1
- 2
0
votes
1 answer
How can I import a module inside a dialog in angular (8)?
I have created a dialog as a component to be reused inside my angular project, when I try to import any module inside my dialog the page doesn't work.
The hierarchy of my project:
So I imported the dialog-m component inside employee-dash page and…

Anonymous
- 21
- 3
0
votes
1 answer
Mat dialog close doesn't work on Angular 11, Meterial 11
The dialog should be closed when I call function close of MatDialogRef instance, but It doesn't.
I have a module called ShareModule, that contains HeaderCompose, and LoginComponent. HeaderComponent using LoginComponent to dialog.

quanchinhong
- 142
- 3
- 18