From server-side I get json-data which describes how my html code has to look. I don't get information about html-tags, though. I'm just getting an object like this:
sections: {
section1: {
subsection1: {
title: 'MyTitle',
type: 'checkbox',
clean: true
},
subsection2: {
title: 'MyTitle2',
type: 'select'
},
subsection3: {
title: 'MyTitle3',
type: 'input'
}
},
section2: {
subsection1: {
...
}
}
...
}
Besides I have an object of values data.
And so on. Input coresponds to an input element, checkbox to checkbox and so on. Title is just a correcponding label to the element and clean is a property to display or don't display on different sections of site. I have limited amount of elements, just four of them (inputs, radio-buttons, checkboxes, selects) and unpredictable data about their combinations from server. (And sections are just a div elemnts with some styles, I think.) Somehow I have to turn it to html. Please, tell me how can I do that in Angular 2.