angular / vscode-ng-language-service

Angular extension for Visual Studio Code
MIT License
773 stars 116 forks source link

Standalone components used in same file without export keyword are marked as not standalone #2081

Open Binek115 opened 3 weeks ago

Binek115 commented 3 weeks ago

🐞 bug report

Is this a regression?

No

Description

If component is used within same file without "export" keyword we get an error "Component imports must be standalone components, directives, pipes, or must be NgModules."

image

Bug Type

What does this bug affect

Reproduction

Steps to reproduce the behavior:

  1. Create component without export keyword
  2. Try to import it in other component within same file

Expected behavior

There is no error

🌍 Your Environment

Angular Version:


Angular CLI: 18.2.0
Node: 18.20.4
Package Manager: npm 10.7.0
OS: win32 x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1802.0
@angular-devkit/build-angular   18.2.0
@angular-devkit/core            18.2.0
@angular-devkit/schematics      18.2.0
@schematics/angular             18.2.0
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.14.10

Extension Version:

v18.2.0

VSCode Version:

1.9.2

Operating System:

Microsoft Windows 10

Extension options:

Anything else relevant?

BojanKogoj commented 1 week ago

Connected to https://github.com/angular/angular/issues/49874