Adding Dynamic drag and drop Form builder not working for angular 12

220 views Asked by At

I am creating dynamic form builder using angular version 12.

I am using Angular-Formio to create dynamic builder. I have installed the package and follow the steps given in the documentation.

I have installed package with this command:-

npm install --save angular-formio

Imported into app module ts

import { FormioModule } from 'angular-formio';

then in import part, I am getting this error. Error Image

I don't know why I am getting this error and which package is better to create dynamic form builder(Drag and drop) using angular 12

2

There are 2 answers

0
anvyn On

Your module is not yet loaded by the Angular Server in node ng serve, so restart your server so the server loads the module that you just added in @NgModule app.module.ts

0
Parth Raval On

Actually, I have installed wrong package

For Angular application, we need to install @formio/angular this package.

Steps to install package:-

  1. npm install --save @formio/angular

  2. Add import { FormioModule } from '@formio/angular'; in app.module.ts file

  3. @NgModule({imports [FormioModule]})

If you are using angular material then, add @formio/angular-material this package.

Steps to install package:-

  1. npm install --save @formio/angular-material

  2. Add

    import { MatFormioModule } from '@formio/angular-material';

    import { FormioModule } from '@formio/angular';

    in app.module.ts file

  3. @NgModule({imports [ FormioModule,FormioModule]})