I am trying to create a directive similar to ngIf https://stackblitz.com/edit/angular-auby7n I does not have much code there. So now my question here is
- When i inject ViewContainerRef inside this directive, what dom element does it represent (if any) ?
- Since when we use a structural directive that gets wrapped inside an ng-template and the directive gets applied to the ng-template, so When i inject TemplateRef inside this directive, does it refer to the ng-template on which this directive gets applied ?
that’s easy to check, right? you just put a debugger inside the constructor and inspect the variable
again, easy to check by inspecting the variable, but yes, you’re right
can you please update this article for angular 10