
So I was testing out dialog for angular since I'm learning how to use it and when I tried to run it this happened. Anyone faced this issue before? Didn't get any errors but I'm fair certain this isn't how angular dialogs are supposed to look like. CSS for the modal is also empty but I've messed around to no avail. Unfortunately I'm unable to show the full code as well since it's sensitive.
I'm using Angular Cli: 11.0.1 Angular Materials: 11.0.0
HTML
<p>test-modal works!</p>
CSS
* {
background: white;
color: white;
}
Code to call the dialog
export class BuyProductComponent implements OnInit {
constructor(public dialog: MatDialog) { }
openBuyOnlineModal() {
this.dialog.open(TestModalComponent, {
hasBackdrop: false
});
console.log('meow');
}
closeModal() {
this.dialog.closeAll
}
ngOnInit(): void { }
}