-
Notifications
You must be signed in to change notification settings - Fork 0
/
reuse.component.ts
43 lines (38 loc) · 1 KB
/
reuse.component.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterOutlet } from '@angular/router';
import { SpaceModule, ISpace, SpaceService } from '@flatfile/angular-sdk';
import { listener } from "./listener";
@Component({
selector: 'app-root',
standalone: true,
imports: [CommonModule, RouterOutlet, SpaceModule],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
title = 'create-flatfile-angular';
showSpace: boolean = false;
data: any;
constructor(private spaceService: SpaceService) {}
toggleSpace() {
this.spaceService.OpenEmbed()
this.showSpace = !this.showSpace;
}
closeSpace() {
this.showSpace = false;
}
spaceProps: ISpace = {
space: {
id: 'us_sp_1234',
accessToken: 'sk_1234'
},
environmentId: 'us_env_1234',
listener,
closeSpace: {
operation: 'submitActionFg',
onClose: this.closeSpace.bind(this),
},
displayAsModal: true
}
}