Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Account for different defaults values of the @Component standalone option based on Angular version#2104

Description

@DallasHoff

馃悶 bug report

Is this a regression?

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

Description

When used on a project that has not upgraded to Angular 19, any components that are not standalone and do not set the standalone option to false in the component are highlighted in HTML files with the example-component-selector is not a known element error.

The default value for standalone was changed from false to true in Angular 19, but this extension should use false as the default value if the installed Angular version is less than 19.

Bug Type

What does this bug affect

  • Angular Language Service VSCode extension
  • Angular Language Service server

Reproduction

On an Angular version <19, create a non-standalone component with no usage of the standalone option in @Component, and attempt to use it inside another component. The app will compile just fine, but the language server will report that the component used is not known.

馃實 Your Environment

Angular Version:


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

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1802.9
@angular-devkit/build-angular   18.2.9
@angular-devkit/core            18.2.9
@angular-devkit/schematics      18.2.9
@angular/cli                    18.2.9
@schematics/angular             18.2.9
rxjs                            6.6.7
typescript                      5.5.4
zone.js                         0.14.10

Extension Version: 19.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions