@3t-transform/tf-form-viewer 中文文档教程
TfFormViewer
Installation
运行 npm i @3t-transform/tf-form-viewer
。 然后导入模块,传入 FormBuilder API 的 URL
imports: [
TfFormViewerModule.forRoot('https://localhost:9000'),
],
Usage
添加
标签,在表单应该出现的地方,传入表单的 registrationId 和一个 关闭表单时调用的事件处理函数,包括表单提交。 readonly
有一个可选输入,默认为 false
。
<lib-tf-form-viewer
[registrationId]="registrationId"
(onClose)="onCloseHandler()"
readonly="true" <-- optional
></lib-tf-form-viewer>
TfFormViewer
Installation
run npm i @3t-transform/tf-form-viewer
. Then import into module, passing in the URL for the FormBuilder API
imports: [
TfFormViewerModule.forRoot('https://localhost:9000'),
],
Usage
Add the <lib-tf-form-viewer>
tag where the form should appear, pass in the registrationId for the form and an event handler function which will be called when the form is closed, including form submission. There is an optional input for readonly
which defaults to false
.
<lib-tf-form-viewer
[registrationId]="registrationId"
(onClose)="onCloseHandler()"
readonly="true" <-- optional
></lib-tf-form-viewer>