The problem was solved by adding <ng-content /> to the template of a component that was using <ng-template>. This is currently an open issue in Angular - github.com/angular/angular/issues/50543
<ng-content />
<ng-template>