发布于 2020-03-11 09:48:18
首先,您需要在项目中安装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,并通过调用rest将表单json保存在数据库中。
<form-builder [form]="{
components: []
}"></form-builder>如果要在组件中显示表单,请使用formion呈现器。
<formio src='https://examples.form.io/example'></formio>如果你需要帮助,请告诉我。
https://stackoverflow.com/questions/60618077
复制相似问题