Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate definitions shown in 'Go to Definition' for Angular templates #2133

Open
1 of 2 tasks
pabloherrero1986 opened this issue Jan 5, 2025 · 0 comments
Open
1 of 2 tasks
Labels

Comments

@pabloherrero1986
Copy link

pabloherrero1986 commented Jan 5, 2025

🐞 bug report

Is this a regression?

No.

Description

Angular templates incorrectly show duplicate definitions for methods or variables in the editor. When clicking on a method or variable, a modal appears to select the definition, but as shown in the attached screenshot, the same definition is listed multiple times.

  • Angular Language Service VSCode extension
  • Angular Language Service server

Reproduction

Steps to reproduce the behavior:

  1. Open an Angular project with strictTemplates set to true in tsconfig.json.
  2. Hover over or click on a method/variable in an Angular template.
  3. Observe that the selection modal lists duplicate definitions for the same item.

Expected behavior

Each method or variable should appear only once in the modal for selection.

Screenshots

Image

🌍 Your Environment

Angular Version: 14, 16 and 18


Angular CLI: 14.2.7
Node: 20.10.0 (Unsupported)
Package Manager: npm 10.2.3 
OS: darwin arm64

Angular: 14.2.8
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1402.7
@angular-devkit/build-angular   14.2.7
@angular-devkit/core            14.2.7
@angular-devkit/schematics      14.2.7
@angular/cdk                    14.2.6
@angular/cli                    14.2.7
@angular/google-maps            14.2.6
@angular/material               14.2.6
@schematics/angular             14.2.7
rxjs                            7.5.7
typescript                      4.7.4

Extension Version:


v19.0.3

VSCode Version:


Version: 1.96.2 (Universal)
Commit: fabdb6a30b49f79a7aba0f2ad9df9b399473380f
Date: 2024-12-19T10:22:47.216Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.0.0

Operating System:


Windows 11 and MacOS 15

Anything else relevant?

  • This issue occurs only when the extension is installed.
  • Uninstalling the extension resolves the problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant