ViewChild selector with Directive not working

I used Ionic 5 & @ionic/angular to create an empty project, and in the app.component.ts file, I tried to access a directive like the following:

@ViewChild(InsertDirective)
_directive: InsertDirective;

Inside ngAfterViewInit(), the this._directive object is undefined. I am not sure why it is not working. Thanks for your thoughts in advance!

Interestingly, I can access this._directive if the ViewChild is declared like the following:
@ViewChild(‘appInsert’)
_directive: InsertDirective;
<ng-template #appInsert>

I suspect there is something wrong with Ionic library as a pure Angular project works fine with either approaches.