git 中的源代码
实时演示
我想在我的angular应用程序中开发Angular8拖放表单生成器功能在上面的git代码中,它是使用纯formio
开发的
我的要求是,我想在我已经存在的角度项目中集成这种角度拖放功能。
我很想集成formio
,请帮我如何进行集成。
有带说明的教程吗?
首先需要在项目中安装formio
npm install --save angular-formio
然后在您的项目模块中导入formioModule
import { FormioModule } from 'angular-formio';
@NgModule({
imports: [ BrowserModule, CommonModule, FormioModule ],
declarations: [ AppComponent ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
之后,如果您想使用formio构建表单,那么在组件中调用formio-builder
,并通过调用restapi将表单json保存在数据库中。
<form-builder [form]="{
components: []
}"></form-builder>
如果你想在组件中显示你的表单,那么使用formion渲染器
<formio src='https://examples.form.io/example'></formio>
如果你需要帮助,请告诉我。