How to add a form to Angular

Send an Angular form to FormTango with HttpClient or plain fetch. No backend route to write.
  1. 1

    Create a free FormTango account and add a form. Copy its endpoint, which looks like https://formtango.com/f/YOUR_FORM_ID.

  2. 2

    Add this standalone component, replacing YOUR_FORM_ID.

  3. 3

    Submit the form once. The submission appears in your FormTango inbox and you get an email.

typescript
import { Component, signal } from '@angular/core';

@Component({
  selector: 'app-contact',
  standalone: true,
  template: `
    @if (status() === 'sent') {
      <p>Thanks! We got your message.</p>
    } @else {
      <form (submit)="send($event)">
        <input type="email" name="email" required />
        <textarea name="message" required></textarea>
        <button [disabled]="status() === 'sending'">Send</button>
        @if (status() === 'error') { <p role="alert">Something went wrong. Please try again.</p> }
      </form>
    }
  `,
})
export class ContactComponent {
  status = signal<'idle' | 'sending' | 'sent' | 'error'>('idle');

  async send(event: Event) {
    event.preventDefault();
    this.status.set('sending');
    const response = await fetch('https://formtango.com/f/YOUR_FORM_ID', {
      method: 'POST',
      headers: { Accept: 'application/json' },
      body: new FormData(event.target as HTMLFormElement),
    });
    this.status.set(response.ok ? 'sent' : 'error');
  }
}

What you get

  • Every submission saved in an inbox you can search and export.
  • An email for each one, with the visitor's address as the reply-to.
  • Spam filtering without making visitors solve a puzzle.
  • Problems? See troubleshooting.

Related guides

HTMLJavaScript (no page reload)ReactNext.jsAstro

Last reviewed November 19, 2026.