i want to display the data using a modal popup with mat-dialog, but the data has not appeared in the popup, how to display the data...???
this for modal ts
export interface DialogData {
noktp: string;
}
openDialog() {
this.dialog.open(Popupform,
{
data: {
noktp: '',
}
});
}
this component popup
@Component({
selector: 'popupform',
templateUrl: 'popupform.html',
})
export class Popupform {
Forms: any =[];
constructor(
public fb: FormBuilder,
public dialog: MatDialog,
private formservice: FormService,
private _formBuilder: FormBuilder,
@Inject(MAT_DIALOG_DATA) public data: DialogData
) {
}
}
this for popup html
<h3 mat-dialog-title>Data Formulir</h3>
<div mat-dialog-content class="mat-typography">
<div class="container">
<form action="">
<div class="row">
<div class="span4 well">
<table class="invoice-head">
<tbody>
<tr *ngIf="data.noktp">
<td class="pull-right"><strong>No KTP</strong></td>
<td>{{data.noktp}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</form>
</div>
</div>