Angular2 - Template reference inside NgSwitch
问题 I have a NgSwitch template. In the NgSwitch I want to get a template reference to the initialized template. Something like this: <div class="container" [ngSwitch]="model.type"> <first-component #ref *ngSwitchCase="0"></first-component> <second-component #ref *ngSwitchCase="1"></second-component> <third-component #ref *ngSwitchCase="2"></third-component> </div> When clicking on a button in the component I want to call to the initialized component (first/second/third) to a method (which defined