export class RegistroService {
constructor(private http: HttpClient, public router: Router) { }
Envioregistro(form: any): void {
swal({
title: 'Espera',
text: 'Procesando',
allowOutsideClick: false,
onOpen: () => {
swal.showLoading()
}
})
debugger
this.http.post(environment.apiUrl + 'api/registro/ValidarRegistroAsync/', form).subscribe((d: boolean) => {
if (d) {
swal({
text: "El registro ha sido enviado, recibirás un correo con las credenciales de ingreso en cuanto validemos la información.",
type: "success",
allowOutsideClick: false,
showCancelButton: false,
showConfirmButton: true,
confirmButtonColor: "#D7405D"
})
} else {
swal({
text: "El correo indicado no se encuentra registrado.",
type: "error",
allowOutsideClick: false,
showCancelButton: false,
showConfirmButton: true,
confirmButtonColor: "#D7405D"
})
}
this.router.navigate(['login']);
})
}
}
-
1y que es lo que no te funciona?– Ramiro Baroneel 5 ene. 2021 a las 3:02
Añade un comentario
|
1 respuesta
export class RegistroService {
constructor(private http: HttpClient, public router: Router) { }
Envioregistro(form: any): void {
swal({
title: 'Espera',
text: 'Procesando',
allowOutsideClick: false,
onOpen: () => {
swal.showLoading()
}
})
debugger
this.http.post(environment.apiUrl + 'api/registro/ValidarRegistroAsync/', form).subscribe((d: boolean) => {
if (d) {
swal({
text: "El registro ha sido enviado, recibirás un correo con las credenciales de ingreso en cuanto validemos la información.",
type: "success",
allowOutsideClick: false,
showCancelButton: false,
showConfirmButton: true,
confirmButtonColor: "#D7405D"
})
} else {
swal({
text: "El correo indicado no se encuentra registrado.",
type: "error",
allowOutsideClick: false,
showCancelButton: false,
showConfirmButton: true,
confirmButtonColor: "#D7405D"
})
}
this.router.navigate(['login']);
})
} }**
-
hola maría, te recomiendo que leas como responder para que puedas mejorar tu respuesta y asi poder ayudar de manera contreta a la hora de enfrentar un problema, saludos– Enzoel 5 ene. 2021 a las 2:42