Skip to content

docusealco/docuseal-angular

Repository files navigation

DocuSeal Angular Components

This package provides a convenient way to embed DocuSeal into Angular apps. Sign documents and create document forms directly in your apps.

Docuseal Form

Installation

npm install @docuseal/angular

Documentation

For detailed documentation, please click here.

Usage

Signing Form

Copy public DocuSeal form URL from https://docuseal.com and use it in the src component prop:

import { Component } from '@angular/core';
import { DocusealFormComponent } from '@docuseal/angular';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [DocusealFormComponent],
  template: `
    <div class="app">
      <docuseal-form
        src="https://docuseal.com/d/LEVGR9rhZYf86M"
        email="[email protected]">
      </docuseal-form>
    </div>
  `
})
export class AppComponent {}

Form Builder

import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { DocusealBuilderComponent } from '@docuseal/angular';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [DocusealBuilderComponent],
  template: `
    <div class="app">
      <ng-container *ngIf="token">
        <docuseal-builder [token]="token"></docuseal-builder>
      </ng-container>
    </div>
  `
})
export class AppComponent implements OnInit {
  token: string = ''

  constructor(private http: HttpClient) {}

  ngOnInit() {
    this.http.post('/api/docuseal/builder_token', {}).subscribe((data: any) => {
      this.token = data.token;
    });
  }
}

License

MIT

Releases

No releases published

Packages

No packages published