I\'m trying to mock up a dynamic set of questions. Think of a quiz, where one question is multiple choice, the second is single answer, the third is yes no..etc.
Us
@Component({
selector: 'my-component',
template: `
checkboxes here {{item?.type}} - {{item?.values}}
radio buttons here{{item?.type}} - {{item?.values}}
boolean here{{item?.type}} - {{item?.values}}
textbox here{{item?.type}} - {{item?.values}}
`
})
export class MyComponent {
@Input() items: any[];
}
You can call your template's based on your "item.type", Rest of the structure looks good in your approach.