使用此starter kit时,我只能获取表格列表。
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { FormioGrid } from 'angular-formio/grid';
import { FormManagerModule, FormManagerRoutes, FormManagerService, FormManagerConfig } from 'angular-formio/manager';
@NgModule({
imports: [
CommonModule,
FormioGrid,
FormManagerModule,
RouterModule.forChild(FormManagerRoutes())
],
declarations: [],
providers: [
FormManagerService,
{provide: FormManagerConfig, useValue: {
tag: 'common'
}}
]
})
export class FormModule { }
哪个指向:
{api_url}/form?tags=common&type=form&limit=10&skip=0
我需要一种获取资源的方法,像这样:
{api_url}/form?tags=common&type=resource&limit=10&skip=0
尝试没有成功地将参数传递给提供程序。
providers: [
FormManagerService,
{provide: FormManagerConfig, useValue: {
tag: 'common',
type: 'resource'
}}
]
我缺少什么?谢谢。
答案 0 :(得分:1)
您可以从type
组件的tags
属性绑定中传递query
和formio-grid
值
<formio-grid
...
[query]="{tags: 'common', type: 'resource'}"
...
>
</formio-grid>