Kashub's Code Barn - "s"

podświetlone jako div (dodał(a) ss @ 2022-09-26 07:34:29)

Twoja wyszukiwarka
Podświetl ten kod w:
Ostatnio dodane:
Losowe wpisy:
IMPORT { Component } FROM '@angular/core';
IMPORT { FormControl, FormGroup, Validators } FROM '@angular/forms';
IMPORT { environment } FROM 'environments/environment';
IMPORT { Subject } FROM 'rxjs';
 
IMPORT { MessageService } FROM 'app/data-access/message/message.service';
 
@Component({
  templateUrl: './contact.component.html',
  styleUrls: ['./contact.component.scss'],
})
export class ContactComponent {
  recaptchaSiteKey = environment.recaptchaSiteKey;
  resolved(captchaResponse: STRING) {
    console.log(`Resolved captcha with response: ${captchaResponse}`);
  }
  success$ = new Subject();
  error$ = new Subject();
 
  form: FormGroup = new FormGroup({
    email: new FormControl(null, [Validators.required, Validators.email]),
    msg: new FormControl(null, [Validators.required]),
    recaptchaReactive: new FormControl(null, Validators.required),
  });
 
  onSubmit(form): void {
    this.success$.next(false);
    this.error$.next(false);
    this.messageService
      .create({
        ID: +new Date(),
        createDate: new Date(),
        content: this.form.controls.msg.value,
        email: this.form.controls.email.value,
      })
      .subscribe({
        next: (message) => {
          // console.log(message);
          this.success$.next(true);
        },
        error: (error) => {
          // console.log(error.message);
          this.error$.next(error);
        },
      });
  }
 
  constructor(PRIVATE messageService: MessageService) {}
}
 
| Sklepy internetowe | | Opony motocyklowe | | Sklep z artykułami RTV/AGD | | Programista Trójmiasto | | Skróć link | | Blog o książkach | | Darmowe Blogi | | Przenieś bloga z onetu | | Opisy na Facebooka | | Pionowe opisy |