Installation
Compatibility
Section titled “Compatibility”At this time this package is only compatible with Angular 19.2.1 or above.
Primary Installation via ng-add
Section titled “Primary Installation via ng-add”Running the following command will install ngx-formwork.
ng add ngx-formworkBy default, the following things will be done
- Add ngx-formwork as a dependency
- Create a registration configuration file
- Setup token based registration including
- barrel export
- component registration
- validator registration
- async validator registration
- Setup helper files including
- barrel export
- control host directives
- control container view provider
- Create a schematics configuration file
- Provide formwork in your
app.config.ts - Install dependencies
Options
Section titled “Options”| Option | Type | Required | Default | Description |
|---|---|---|---|---|
| —project | string | No | workspace default project | Angular project to add ngx-formwork to. |
| —registrationStyle | token | config | No | token | The registration style to be used. |
| —provideInline | boolean | No | false | Put the provider configuration object of provideFormwork inline, instead of putting it in a separate file. |
| —providerConfigPath | string | No | app | Where the provider configuration file should be placed, relative to the project root. |
| —providerConfigFileName | string | No | formwork.config.ts | Name of the provider configuration file. |
| —includeSyncValidators | boolean | No | true | Whether to include the setup for validators. |
| —includeAsyncValidators | boolean | No | true | Whether to include the setup for async validators. |
| —useHelper | boolean | No | true | Include helper files for view providers and host directives. |
| —helperPath | string | No | app/shared/helper | Where helper files should be placed, relative to the project root. |
| —splitRegistrations | boolean | No | true | Whether to split the registrations into a separate file. If false, registrations will happen directly in the formwork.config.ts or app.config.ts, depending on the registration style and the provideInline option. |
| —registrationsPath | string | No | app/registrations | Where registration files should be placed, relative to the project root. |
| —useSchematicConfig | boolean | No | true | Whether to include an extra file for schematics configuration. If set to false, all configuration for the schematics will be set up in angular.json. |
| —schematicsConfigPath | string | No | app | Where the schematics config should be placed, relative to the project root. |
| —schematicConfigFileName | string | No | formwork.config.json | Name of the schematic config file. |
Manual Installation
Section titled “Manual Installation”For manual setup and configuration, see the Manual Setup guide.