本文整理汇总了TypeScript中@ng-dynamic-forms/core.DynamicFormService类的典型用法代码示例。如果您正苦于以下问题:TypeScript DynamicFormService类的具体用法?TypeScript DynamicFormService怎么用?TypeScript DynamicFormService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DynamicFormService类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: beforeEach
beforeEach(inject([DynamicFormService], (service: DynamicFormService) => {
formGroup = service.createFormGroup(formModel);
component.group = formGroup;
component.model = testModel;
fixture.detectChanges();
testElement = debugElement.query(By.css(`p-inputSwitch[id="${testModel.id}"]`));
}));
示例2: beforeEach
beforeEach(inject([DynamicFormService], (service: DynamicFormService) => {
formGroup = service.createFormGroup(formModel);
component.group = formGroup;
component.model = testModel;
fixture.detectChanges();
testElement = debugElement.query(By.css(`fieldset[role="radiogroup"]`));
}));
示例3: beforeEach
beforeEach(inject([DynamicFormService], (service: DynamicFormService) => {
formGroup = service.createFormGroup(formModel);
component.group = formGroup;
component.model = testModel;
fixture.detectChanges();
testElement = debugElement.query(By.css(`mat-datepicker`));
}));
示例4: inject
inject([DynamicFormService], (service: DynamicFormService) => {
formGroup = service.createFormGroup(formModel);
component.group = formGroup;
component.model = testModel;
component.ngOnChanges({
group: new SimpleChange(null, component.group, true),
model: new SimpleChange(null, component.model, true)
});
fixture.detectChanges();
testElement = debugElement.query(By.css(`input[name='foo']`));
})
示例5: ngOnInit
ngOnInit() {
this.formModel = this.configurationService.getFormModel(
this.connection,
false
);
this.formGroup = this.formService.createFormGroup(this.formModel);
this.formChangesSubscription = this.formGroup.valueChanges.subscribe(
data => {
this.connection.configuredProperties = this.configurationService.sanitize(data);
}
);
this.current.formGroup = (this.hasCredentials) ? null : this.formGroup;
}
示例6: ngOnInit
ngOnInit() {
this.formModel = this.configurationService.getFormModel(
this.connection,
false
);
this.formGroup = this.formService.createFormGroup(this.formModel);
this.formChangesSubscription = this.formGroup.valueChanges.subscribe(
data => {
Object.keys(data).forEach(key => {
if (data[key] === null) {
delete data[key];
}
});
this.connection.configuredProperties = data;
}
);
}
示例7: clear
clear() {
this.formService.clearFormArray(this.arrayControl, this.arrayModel);
}
示例8: remove
remove(index: number) {
this.formService.removeFormArrayGroup(index, this.arrayControl, this.arrayModel);
}
示例9: add
add() {
this.formService.addFormArrayGroup(this.arrayControl, this.arrayModel);
}