docs(download): add download button with hubspot form (#5725)

This commit is contained in:
Denis Strigo 2020-07-10 13:34:49 +03:00 committed by GitHub
parent b232c95a6e
commit f5f29bc041
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 301 additions and 25 deletions

View file

@ -0,0 +1,35 @@
/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import { AfterViewInit, Component } from '@angular/core';
import { NbDialogRef } from '@nebular/theme';
@Component({
selector: 'ngx-download-form',
templateUrl: './download-form.component.html',
styleUrls: ['./download-form.component.scss'],
})
export class DownloadFormComponent implements AfterViewInit {
constructor(protected ref: NbDialogRef<DownloadFormComponent>) {
}
ngAfterViewInit() {
hbspt.forms.create({
portalId: '2452262',
formId: '93007d7b-5f11-4dd8-bcfd-f8b99d31f31e',
target: '#hubspotForm',
submitButtonClass: 'btn',
css: '',
cssClass: 'custom-form',
redirectUrl: 'https://github.com/akveo/ngx-admin',
});
}
closeDialog() {
this.ref.close();
}
}