Skip to content

@formerie/angular

Formerie for Angular

Send form submissions from Angular to Formerie, without holding recipients, templates, or provider keys in your code.

Works with

Install

These packages are in alpha, so their APIs may change.

pnpm

pnpm add @formerie/angular

npm

npm install @formerie/angular

Yarn

yarn add @formerie/angular

Bun

bun add @formerie/angular

Use it

FormerieService is an injectable service that handles requests and responses through @formerie/client.

You’ll need a published form. Replace example.com and contact with your workspace and form handles from the app.

import { Component, inject } from "@angular/core";
import { FormerieService } from "@formerie/angular";

@Component({
  selector: "app-contact",
  template: "<button (click)=\"submit()\">Send</button>",
})
export class ContactComponent {
  private readonly formerie = inject(FormerieService);

  submit() {
    return this.formerie.submit(
      {
        workspace: "example.com",
        form: "contact",
      },
      {
        fields: {
          email: "jane@example.com",
        },
      },
    );
  }
}

What happens next

Create a workspace and publish your first form.

In early access. New workspaces start on the Free plan.