Can I mark angular2-schema-form?
person2713 opened this issue · 0 comments
person2713 commented
For example I have next html:
`<div *ngFor="let integration of integrations | objKeys">
<h4 (click)="toggleVisibleForIntegration(integration.key)" #integr>
{{visibleForIntegration.get(integration.key) ? '▼' : '▶'}} {{integration.value.name}}
</h4>
<div *ngIf="visibleForIntegration.get(integration.key)">
<div *ngFor="let scenario of integration.value.scenarios | objKeys">
<p (click)="toggleVisibleForScenario(integration.key, scenario.key)">
{{visibleForIntegrationScenarioWraper(integration, scenario) ? '▼' : '▶'}} {{scenario.value.name}}
</p>
<p>
<app-schema-form
#schem
[id] = "integration.key"
*ngIf="visibleForIntegrationScenarioWraper(integration, scenario)"
[schema]="pojoMapWrapper(scenario)"
[layout]="layout"
[options]="options"
(onSubmit)="executeScenario($event)">
</app-schema-form>
</p>
</div>
</div>
</div>`
I wonder is there way mark json-schema and then get her with id in component? As see from code that I posted above, I have several <app-schema-form></app-schema-form>
and I need get selected of them in component (with data and schema), but I don't have any idea. I read about FormGroup and ViewChildren, but I don't know how to distinguish <app-schema-form></app-schema-form>
that was selected from other.
I will appreciate for your suggestions.