Angular - Advanced Patterns
Why does this custom structural directive fail to toggle content?
@Directive({ selector: '[appShow]' })
export class ShowDirective {
constructor(private tpl: TemplateRef, private vcr: ViewContainerRef) {}
@Input() set appShow(condition: boolean) {
if (condition) {
this.vcr.createEmbeddedView(this.tpl);
}
}
} 