question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'constructor' of undefined at Ng2AutoCompleteComponent

See original GitHub issue

Hi,

I installed ng2-auto-complete in my Angular2 project, it is built with angular-cli.

And I imported Ng2AutoCompleteModule in my AppModule.

But I am getting the following error:

TypeError: Cannot read property 'constructor' of undefined at Ng2AutoCompleteComponent

How can I fix it?

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
MattSidorcommented, Dec 30, 2016

I had this error too. In my case, it was because I had the incorrect variable name in the template (e.g. <input type="text" auto-complete [source]="myVariable">)

0reactions
OmkarJadhav21commented, Jan 30, 2018

You have a problem with the [source] variable name which you write i.e. [source]=“myVariable”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'Constructor' of ...
I have a django project and want to autocomplete words in an input text box. This is text box: <input type="text" id="keyword_search" ...
Read more >
Cannot read property 'constructor' of null. Did I miss something?
Each time I want to chose a product in the new expenses, I got an error "Cannot read property 'constructor' of null" I...
Read more >
Cannot read property 'constructor' of undefined - Smart UI ...
Uncaught TypeError: Cannot read property 'constructor' of undefined at HTMLElement.value (smart.button.js?88ec:8)
Read more >
Fix: Cannot Read Property 'constructor' of undefined error in ...
The “cannot read property 'constructor' of undefined” error occurs when you attempt to access the constructor property of a variable that is undefined...
Read more >
"Cannot read property 'constructor' of undefined" JavaScript ...
Uncaught TypeError: Cannot read property 'constructor' of undefined. This can be experienced for field controls and form field controls, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found