Can someone tell me why when I click the Crear Proyecto button, the modal opens but then closes instantly?
https://stackblitz.com/edit/angular-gsgmu8?embed=1&file=app/portafolio/portafolio.component.ts
I am inserting the content of a component within the modal. I'm using Angular material.
portafolio.component.ts
import { CrearProyectoComponent } from '../crear-proyecto/crear-proyecto.component';
import { MatDialog } from '@angular/material';
constructor(public dialog: MatDialog) { }
openAddModal() {
let dialogRef = this.dialog.open(CrearProyectoComponent, {
width: '600px'
});
}