Dynamic template based on value rather than variable with ngTemplateOutlet
问题 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. Using angular 4.1, I thought that templating with ngTemplateOutlet would be the best way to go for this, the idea being that I can style all the checkboxes to be the same, and all the radiobuttons the same etc. @Component({ selector: 'my-component', template: ` <div *ngFor="let item of items"> <ng-template [ngTemplateOutlet]="item