angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng generate with --style=none

Open marko164 opened this issue 4 years ago • 2 comments

🐞 Bug report

Command (mark with an x)

  • [ ] new
  • [ ] build
  • [ ] serve
  • [ ] test
  • [ ] e2e
  • [x] generate
  • [ ] add
  • [ ] update
  • [ ] lint
  • [ ] extract-i18n
  • [ ] run
  • [ ] config
  • [ ] help
  • [ ] version
  • [ ] doc

Description

When running ng generate component with --style=none, created component has extra comma after templateUrl

🔬 Minimal Reproduction

ng generate component test-component --style=none

import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';

@Component({
  selector: 'test-component',
  templateUrl: './test-component.component.html',, <-------------
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class TestComponentComponent implements OnInit {

  constructor() { }

  ngOnInit(): void {
  }

}

🌍 Your Environment




     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 13.3.0
Node: 16.13.1
Package Manager: npm 8.1.2
OS: linux x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1303.0
@angular-devkit/build-angular   13.3.0
@angular-devkit/core            13.3.0
@angular-devkit/schematics      13.3.0
@schematics/angular             13.3.0
rxjs                            7.5.5
typescript                      4.6.3

marko164 avatar Mar 29 '22 20:03 marko164

Duplicate of https://github.com/angular/angular-cli/issues/22857

alan-agius4 avatar Mar 29 '22 20:03 alan-agius4

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.