Answer the question
In order to leave comments, you need to log in
How to process XML as a template?
The bottom line is this: XML structures are stored on the server, something like this:
<Container Id="accordion">
<VerticalLayout Margin="true" Spacing="true" PanelCaption="Основные атрибуты">
<HorizontalLayout Margin="false" Spacing="true">
Some content
</HorizontalLayout>
</VerticalLayout>
</Container>
Answer the question
In order to leave comments, you need to log in
As follows from the comments, the task is to display multiple forms. The source of the forms is not so important: they are created manually, with a toolkit, or they are generated automatically. It will be difficult to solve with dynamic loading in Angular (and even more so to bind in MV *, processing in the component's controller / model), therefore, a different approach to rendering forms by means of a statically assembled application suggests itself. Try to solve this with form metadata. Let the form be represented by a description of the fields, say, JSON or XML, and a single (and complex) Angular template will generate, roughly speaking, something like this:
<div *ngFor="let element of formElementsList">
<div *ngIf="element.type == 'text'">
<label>{{ element.label }}:
<input [(ngModel)]="element.value" />
</label>
</div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question