Custom form flow component
Registering a custom component
app.module.ts
app.module.ts...
// import FORM_FLOW_COMPONENT_TOKEN
import { FORM_FLOW_COMPONENT_TOKEN } from '@valtimo/form-link';
...
// import your custom component from wherever you have defined it
import {SomeCustomComponent} from 'component-path';
...
// add this to the providers array of the AppModule
...
providers: [
{
provide: FORM_FLOW_COMPONENT_TOKEN,
useValue: [
{
id: 'some-component-id',
component: SomeCustomComponent,
}
]
}
]
...
export class AppModule {
...
}Using a custom component in a form flow
Last updated