When using Angular 9.0 or above, I receive the following error:
core.js:6189 ERROR TypeError: Cannot read property 'createEmbeddedView' of undefined
at ViewContainerRef.createEmbeddedView (core.js:15442)
at NgxTypeAheadComponent.renderTemplate (ngx-typeahead.js:333)
at NgxTypeAheadComponent.ngOnInit (ngx-typeahead.js:320)
at callHook (core.js:4690)
at callHooks (core.js:4654)
at executeInitAndCheckHooks (core.js:4595)
at refreshView (core.js:11875)
at refreshDynamicEmbeddedViews (core.js:13220)
at refreshView (core.js:11880)
at refreshComponent (core.js:13295)
at refreshChildComponents (core.js:11586)
at refreshView (core.js:11909)
at refreshComponent (core.js:13295)
at refreshChildComponents (core.js:11586)
at refreshView (core.js:11909)
With the following template code:
<input ngxTypeahead [taUrl]="typeaheadURL" [taApi]="'http'" [taQueryParam]="'term'" [taDebounce]="500" [taItemTpl]="itemTpl" (taSelected)="handleResultSelected($event)" type="text" class="form-control" formControlName="criteria" />
<ng-template #itemTpl let-result>
{{ result.desc }}
</ng-template>
When using Angular 9.0 or above, I receive the following error:
With the following template code: