The in-memory driver is for rapid development without the need to set up a magento/shopify/etc backend. It will mock out the submission of a contact form and operate like a functional backend.
To set up in the root component:
DaffContactInMemoryDriverModule from @daffodil/contact/driver/in-memoryHttpClientInMemoryWebApiModule from angular-in-memory-web-apiDaffContactInMemoryDriverModule.forRoot() and HttpClientInMemoryWebApiModule.forRoot() in the imports section.import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';
import { DaffContactInMemoryDriverModule } from '@daffodil/contact/driver/in-memory';
@NgModule({
imports: [
DaffContactInMemoryDriverModule.forRoot(),
HttpClientInMemoryWebApiModule.forRoot()
]
})
export class AppModule {}
Now your DaffContact implementation will have access to the In-Memory driver to use while developing.
Note: It is important to only have one
@daffodil/contactdriver set up at a time in the root component.
The Hubspot forms driver allows the contact form to connect directly to your Hubspot account to manage contact form submissions.
To set up in the root component:
DaffContactHubSpotDriverModule from @daffodil/contact/driver/hubspot.DaffContactHubSpotDriverModule.forRoot(config) in the imports section, where config is a DaffHubspotConfig object containing information needed to connect to your hubspot form. Find your Hubspot form's information here.import { DaffContactHubSpotDriverModule } from '@daffodil/contact/driver/hubspot';
import { DaffHubspotConfig } from '@daffodil/driver/hubspot';
const config: DaffHubspotConfig = { portalId: '123456', guid: 'ff9999' };
@NgModule({
imports: [
DaffContactHubSpotDriverModule.forRoot(config)
]
})
export class AppModule {}
Now your DaffContact implementation will connect to your registered Hubspot Form for use in your app!
Note: It is important to only have one
@daffodil/contactdriver set up at a time in the root component.