When we have
<cmp *ng-if="'true'"></cmp>
The injector creating component cmp is a child of the injector containing NgIf (in fact NgIf is injectable into cmp. The injector tree should match the DOM tree and since the DOM looks like
The cmp injector is a sibling of the ng-if injector.