Skip to content

Auto import not working in Angular standalone #1873

@luisbytes

Description

@luisbytes

In the Angular standalone starter, the auto import feature (in VS Code) doesn’t work for Ionic components.

This happens because the .vscode/settings.json file excludes "@ionic/angular" from the typescript.preferences.autoImportFileExcludePatterns.

{
  "typescript.preferences.autoImportFileExcludePatterns": ["@ionic/angular/common", "@ionic/angular"]
}

This exclusion not only blocks imports from the barrel file (@ionic/angular), but also from any subpath like:

import { IonButton } from '@ionic/angular/standalone';

As a result, VS Code doesn't suggest or auto-import Ionic components when using standalone components.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions