Difference between ElementRef and TemplateRef in angular4
问题 i have seen many examples of ElemenetRef and TemplateRef which got me more confused. what is the difference between ElementRef and TemplateRef why we should use one over another HTML <ng-template #element> <div style="border:solid 3px yellow;width:250px; height:250px;position:relative;top:0px;"> this is my element </div> </ng-template> <ng-container #template> </ng-container> .ts file @ViewChild('element', { read: TemplateRef }) element: TemplateRef<any>; @ViewChild('template', { read: