I want to generate a UI based on backend data provided in a service.
My Service will look like below:
{
"ControlData": {
"results": [{
"Label": "Gender?",
"Type": "COMBOBOX"
}],
"ControlValues": {
"results": [{
"Key": "M",
"Value": "Male"
},
{
"Key": "F",
"Value": "Female"
}
]
}
}
}
Here I want to generate a ComboBox control with label and values provided in the service dynamically.
Please provide me any example or reference to do so.
You need to use factory functions