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

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

Open
1 of 2 tasks
Binek115 opened this issue Aug 22, 2024 · 1 comment
Open
1 of 2 tasks
Labels

Comments

@Binek115
Copy link

🐞 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

  • Angular Language Service VSCode extension
  • Angular Language Service server

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?

@Binek115 Binek115 added the bug label Aug 22, 2024
@BojanKogoj
Copy link

Connected to angular/angular#49874

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

2 participants