Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
It seems that in PR #64745 that should have fixed #64741 I missed a case with preceding whitespace characters before the template name. For example, in the following case, the ng-template definition would be incorrectly removed. Note that there are whitespace characters between ngTemplateOutlet=" and sampleTemplate.
<div *ngIf="sampleVar else sampleTemplate">
<ng-container *ngTemplateOutlet="
sampleTemplate; context: {
value: 'sampleVar is true'
}">
</ng-container>
</div>
<ng-template #sampleTemplate let-value="value">
<h1>{{ value ?? "sampleVar is false" }}</h1>
</ng-template>