当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript core.DynamicFormService类代码示例

本文整理汇总了TypeScript中@ng2-dynamic-forms/core.DynamicFormService的典型用法代码示例。如果您正苦于以下问题:TypeScript DynamicFormService类的具体用法?TypeScript DynamicFormService怎么用?TypeScript DynamicFormService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了DynamicFormService类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: constructor

    constructor(private formService: DynamicFormService) {

        //this.formModel1 = BASIC_EXAMPLE_MODEL;
        //this.formModel2 = BASIC_EXAMPLE_ARRAY_MODEL;

        this.formModel1 = this.formService.fromJSON(JSON.stringify(BASIC_EXAMPLE_MODEL));
        this.formModel2 = this.formService.fromJSON(JSON.stringify(BASIC_EXAMPLE_ARRAY_MODEL));

        this.formGroup1 = this.formService.createFormGroup(this.formModel1);
        this.formGroup2 = this.formService.createFormGroup(this.formModel2);
    }
开发者ID:CodeFork,项目名称:ng2-dynamic-forms,代码行数:11,代码来源:basic-example.component.ts

示例2: beforeEach

    beforeEach(inject([DynamicFormService], (service: DynamicFormService) => {

        formGroup = service.createFormGroup(formModel);

        component.group = formGroup;
        component.model = formModel[0];

        fixture.detectChanges();

        inputElement = debugElement.query(By.css(`input[id='${formModel[0].id}']`));
    }));
开发者ID:CodeFork,项目名称:ng2-dynamic-forms,代码行数:11,代码来源:dynamic-form-bootstrap.component.spec.ts

示例3: beforeEach

    beforeEach(inject([DynamicFormService], (service: DynamicFormService) => {

        formGroup = service.createFormGroup(formModel);

        component.group = formGroup;
        component.model = formModel[0];

        fixture.detectChanges();

        selectElement = debugElement.query(By.css(`kendo-dropdownlist`));
    }));
开发者ID:CodeFork,项目名称:ng2-dynamic-forms,代码行数:11,代码来源:dynamic-form-kendo.component.spec.ts

示例4: ngOnInit

    ngOnInit() {

        this.checkboxControl = this.formGroup1.controls["basicCheckbox"] as FormControl;
        this.checkboxModel = this.formService.findById("basicCheckbox", this.formModel1) as DynamicCheckboxModel;

        this.arrayControl = this.formGroup2.controls["basicFormArray"] as FormArray;
        this.arrayModel = this.formService.findById("basicFormArray", this.formModel2) as DynamicFormArrayModel;
    }
开发者ID:CodeFork,项目名称:ng2-dynamic-forms,代码行数:8,代码来源:basic-example.component.ts

示例5: clear

 clear() {
     this.formService.clearFormArray(this.arrayControl, this.arrayModel);
 }
开发者ID:CodeFork,项目名称:ng2-dynamic-forms,代码行数:3,代码来源:basic-example.component.ts

示例6: remove

 remove(index: number) {
     this.formService.removeFormArrayGroup(index, this.arrayControl, this.arrayModel);
 }
开发者ID:CodeFork,项目名称:ng2-dynamic-forms,代码行数:3,代码来源:basic-example.component.ts

示例7: add

 add() {
     this.formService.addFormArrayGroup(this.arrayControl, this.arrayModel);
 }
开发者ID:CodeFork,项目名称:ng2-dynamic-forms,代码行数:3,代码来源:basic-example.component.ts


注:本文中的@ng2-dynamic-forms/core.DynamicFormService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。