Here\'s the code I\'m trying to get to work (angular 5):
import { Component, ViewChild, TemplateRef, ViewContainerRef } from \'@angular/core\';
@Component
When you reference in the *ngIf, else clause can’t be any arbitrary component, but it must be a ng-template.
For eg,
in a component where you have a source code similar to this:
The resulting source code should look like this:
ref : https://techoverflow.net/2018/02/17/how-to-fix-angular-typeerror-templateref-createembeddedview-is-not-a-function/