Skip to content

TypeError: Cannot read property 'createEmbeddedView' of undefined #48

@alsoicode

Description

@alsoicode

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions