Skip to content

bug: Creating a component adds two spaces before implements OnInit #5105

@kurti-vdb

Description

@kurti-vdb

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

Creating a new component with ionic g c new-component automatically implements OnInit. While doing this, it adds two spaces before implements OnInit instead of one. This is a cli bug and of course a non blocking minor.

Expected Behavior

Remove the extra space.

Steps to Reproduce

  • ionic g c new-component
  • check the generated ts file

Code Reproduction URL

https://github.com

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/kurti/.nvm/versions/node/v22.12.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.4.2
@angular-devkit/build-angular : 19.1.4
@angular-devkit/schematics : 19.1.4
@angular/cli : 19.1.4
@ionic/angular-toolkit : 12.1.1

Capacitor:

Capacitor CLI : 6.2.0
@capacitor/android : 6.2.0
@capacitor/core : 6.2.0
@capacitor/ios : 6.2.0

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v22.12.0 (/Users/kurti/.nvm/versions/node/v22.12.0/bin/node)
npm : 10.9.0
OS : macOS Unknown

Additional Information

No response

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