Questions tagged [mat-dialog]
145 questions
0
votes
2 answers
Angular matDialog should display with two empty div's with styles
I am trying to display a component as a popup using matDialog in angular. Inside the component's HTML, I have formed along with two empty with basic styles as width and bgcolor. But in matDialog, only the form is getting displayed but not the empty…
0
votes
1 answer
mat Dialog: How to create 2 custom dialogs with different styles
I have 2 components (1 dialog per component), and i want to have an dialog with opacity: 0, and another dialog with opacity: 1.
I used this:
::ng-deep {
.cdk-overlay-backdrop.cdk-overlay-backdrop-showing {
opacity: 0;
}
but it also affects…

Elisei Nicolae
- 293
- 2
- 12
0
votes
0 answers
Angular onDestroy called before MatDialog displays
I recently updated my project from Angular 6 to Angular 11. Naturally this caused some problems. The problem I'm working through right now is that I have a MatDialog that is displayed when a button is clicked. After this MatDialog is closed, another…

Dominic Holt
- 162
- 1
- 12
0
votes
1 answer
how to manage what send when close matdialog in angular material dialog
https://stackblitz.com/edit/angular-gd5gcg?file=app/dialog-overview-example-dialog.html
In this example of the official documentation, I see that the value returned when you close the matdialog is this
0
votes
1 answer
ngModel in MatDialog not updating model when value entered in dialog
I'm sure I must be missing something terribly simple but I've been thrashing about with this for a full day now...
I have a MatDialog with one text input.
Upon closing the dialog this value needs to be sent to the parent component.
the matDialog…

Ego Placebo
- 157
- 2
- 14
0
votes
1 answer
Compilation Error in while making changes in Mat-dialog-box in Angular 9
ERROR TypeError: Cannot read property 'focus' of undefined
core.js:4197 ERROR Error: The pipe 'translate' could not be found!
these two errors pop out in the console whenever I change my code inside the mat-dialog box and compile my code and after…

Vignesh Ravichandran
- 169
- 3
- 10
0
votes
2 answers
Getting data passed to a mat-dialog using *ngFor
I'm trying to display data passed to a dialog component using *ngFor.
I'm passing data like this
const columnNames=['firstName', 'lastName','userName'];
this.dialog.open(DatatableAdvancedSearchComponent,{
width: '250px',
…

BGT
- 107
- 1
- 8
0
votes
1 answer
Mat Dialog pass array
when the user clicks the button to bring up the information, it opens with the mat dialog. But popup is blank, data is not pass.
0
votes
1 answer
Show data in json view after injection in a matDailog (Angular 9+)
I need to show data in JSON view inside MatDialog. I am using an API to fetch some data and then injecting it into the dialog box using data option of MatDialog. Data is being injected successfully and also accessible in the dialog component. I'm…

ess.etch
- 11
- 3
0
votes
1 answer
Passing more than one property using @Inject MAT_DIALOG_DATA
This dialog is shared, I need to use it in different cases. What I'm trying is receiving different data when a component uses the dialog.
I can receive the first data correctly, but the 'data2' is the same that the 'data1'... is it possible using…

Ravel Sbrissa Okada
- 119
- 6
- 16
0
votes
1 answer
getting error when trying to inject data into mat-dialog
I am trying to open a model that will display information from another component. I'm injecting the data into the child component, but I'm getting an error. I was wondering whether it's because the array I'm injecting is sometimes null.
ERROR…

Heidi E
- 221
- 8
- 22
0
votes
1 answer
Showing a component in Angular Material Custom Dialog
I have a resusable custom Material UI Dialog and I wanted to show a different component in it.
For example onne time call it and show a Login component and another time show a registeration component, that is just example.
The problem is when I…

HamidFaridi
- 33
- 4
0
votes
1 answer
Can you add a Modal dialog to an existing component in Angular?
I have a mat-card element with an image inside.
HTML
TS
@Component({
selector: 'app-cardbox',
templateUrl:…


bensalerno
- 467
- 1
- 6
- 22
0
votes
1 answer
how to write unit test to cover all the condition of breakpoint observer?
I try to write unit test breakpoint observer. but the positive condition is not covered
isSmallScreen: Observable = this.breakpointObserver.observe('(max-width: 767px)');
openEntityDetailDialog(): void {
…

Muthukani K
- 151
- 1
- 15
0
votes
1 answer
Angular mat dialogue not saving multiple values
I am using Anular9 and using mat-raised-button as below:
The saveClick() is defined as below
saveClick() {
for (let i = 0; i <…

meallhour
- 13,921
- 21
- 60
- 117