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.

cva Error: Cannot read property 'nativeElement' of undefined

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package @angular/....

Is this a regression?

Yes, the previous version in which this bug was not present was: 7

Description

In ViewChild if i pass {static:true} then it is working fine but in older version of angular without {static: true} it was working fine.

πŸ”¬ Minimal Reproduction

https://stackblitz.com/...

Angular 10 https://stackblitz.com/edit/angular-ivy-sili1e?file=src%2Fapp%2Frequired-text%2Frequired-text.component.ts Angular 7 https://stackblitz.com/edit/angular-7-master-swasmm?file=src%2Fapp%2Fapp.component.html

πŸ”₯ Exception or Error





🌍 Your Environment

Angular Version:




"@angular/core": "^10.0.9",

Anything else relevant?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
sodcommented, Sep 29, 2020

Yes, it’s a breaking change. But angular 8 yelled with deprecation warnings at you - if the option was missing - and the migration to ng8 actually added {static: true} to all ViewChilds.

So it’s an unfortunate consequence of skipping the angular 8 major

0reactions
angular-automatic-lock-bot[bot]commented, Oct 30, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'nativeElement' of undefined in angular ...
Seem like you are trying to access the element when it not visible to DOM yet so what you can do is run...
Read more >
Cannot read property 'nativeElement' of undefined - Ionic Forum
I am using ArcGIS Map using angular and am getting error to render my HTML Div tag and error is β€œCannot read property...
Read more >
Cannot read property '$ngoptionlabel' of null when using ng ...
The error means that one of the items in the array being displayed is null . To solve this, filter null s out...
Read more >
Error: Cannot read property 'nativeElement' of undefined
There are error at console with this message "ERROR TypeError: Cannot read property 'nativeElement' of undefined".
Read more >
Cannot read property 'nativeElement' of undefined and ...
Cannot read property 'nativeElement' of undefined and IntegrationError: We could not retrieve data from the specified Element.
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