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.

ivy-native issue with the component variables in the templates

See original GitHub issue

After enabling the ivy-native feature my project got bugged where the templates(.html) couldn’t recognize the component variables or methods at all nor showing any error when writing an undefined variable. the image below is when clicking on the go to definition option of the variable.

image

Additional context

Angular CLI: 11.2.0
Node: 14.15.1
OS: win32 x64

Angular: 11.2.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, localize, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1001.7
@angular-devkit/build-angular   0.1001.7
@angular-devkit/core            10.1.7
@angular-devkit/schematics      11.2.0
@schematics/angular             11.2.0
@schematics/update              0.1102.0
rxjs                            6.6.3
typescript                      4.1.5

UPDATES

  • updated my project to Angular 11, that didn’t fix the issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:24
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
jtsomcommented, Feb 15, 2021

Am seeing the same issue in the html file, with errors in the console every time I hover something:

image

Also seeing double when hovering over variables, etc. in the component file:

image image

… turning Ivy off.

7reactions
255kbcommented, Feb 15, 2021

@AaronDovTurkel add "angular.experimental-ivy": false in your VSCode settings

Read more comments on GitHub >

github_iconTop Results From Across the Web

Variables - Issue Templates for Jira
Variables are placeholders that get automatically filled in when you create an issue using a template. They make your templates consistent ...
Read more >
strange problem migrating angular 8 app to 9 - Stack Overflow
In my case, with Angular 11, I was binding input field to template variable (i.e. [(ngModel)]="UserNameSearch") instead of component ...
Read more >
Understanding template variables - Angular
Use template variables to perform tasks such as respond to user input or finely tune ... Refer to a template variable anywhere in...
Read more >
Type-checking templates in Angular View Engine and Ivy
It shows us that Angular treats a component's template as a partial TypeScript ... type-safety for directives accessed by template reference variable '#'....
Read more >
How to auto-populate "Component/s" field with "Use...
I have installed the "Issue Templates" plug-in installed and can see how to autopopulate certain fields in new issues with "User Variables" and...
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