Created
November 25, 2019 19:06
-
-
Save parzibyte/9bc053a1dff6cbbf0d4a7a03dce2a291 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from "@angular/core"; | |
import { Mascota } from "../mascota"; | |
@Component({ | |
selector: "app-formulario-mascota", | |
templateUrl: "./formulario-mascota.component.html", | |
styleUrls: ["./formulario-mascota.component.css"] | |
}) | |
export class FormularioMascotaComponent implements OnInit { | |
// El modelo ligado al formulario, por defecto vacío | |
mascotaModel = new Mascota("", "", undefined); | |
constructor() {} | |
ngOnInit() {} | |
formularioEnviado(){ | |
/* | |
Aquí el formulario ha sido enviado, ya sea | |
por presionar el botón, presionar Enter, etcétera | |
*/ | |
console.log("El formulario fue enviado y la mascota es: ", this.mascotaModel) | |
alert("Enviado"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment