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

control-flow command freeze #54587

Closed
Sp1r1tus opened this issue Feb 23, 2024 · 1 comment
Closed

control-flow command freeze #54587

Sp1r1tus opened this issue Feb 23, 2024 · 1 comment
Assignees
Labels
area: migrations Issues related to `ng update` migrations core: control flow Issues related to the built-in control flow (@if, @for, @switch) state: has PR
Milestone

Comments

@Sp1r1tus
Copy link

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

No

Description

make a new project and change the app.component.html with this content:

<ng-container *ngIf="true">
  <component-name-with-lots-of-minus></component-name-with-lots-of-minus
></ng-container>

run the command

ng g @angular/core:control-flow

image

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

freeze because lots of "-" and ">" is on last line

Please provide the environment you discovered this bug in (run ng version)

package.json:

{
  "name": "test",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test",
    "serve:ssr:test": "node dist/test/server/server.mjs"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^17.2.0",
    "@angular/common": "^17.2.0",
    "@angular/compiler": "^17.2.0",
    "@angular/core": "^17.2.0",
    "@angular/forms": "^17.2.0",
    "@angular/platform-browser": "^17.2.0",
    "@angular/platform-browser-dynamic": "^17.2.0",
    "@angular/platform-server": "^17.2.0",
    "@angular/router": "^17.2.0",
    "@angular/ssr": "^17.2.1",
    "express": "^4.18.2",
    "rxjs": "~7.8.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.14.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^17.2.1",
    "@angular/cli": "^17.2.1",
    "@angular/compiler-cli": "^17.2.0",
    "@types/express": "^4.17.17",
    "@types/jasmine": "~5.1.0",
    "@types/node": "^18.18.0",
    "jasmine-core": "~5.1.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.2.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.1.0",
    "typescript": "~5.3.2"
  }
}

Anything else?

in my case the component was very long and prettier doesn't change the ">" from the last line.

If the template looks like this, it works!

<ng-container *ngIf="true">
  <component-name-with-lots-of-minus></component-name-with-lots-of-minus>
</ng-container>

if you need something else let me know.

And SORRY this is my first issue, if i forgot something. Please be considerate :-)

@pkozlowski-opensource pkozlowski-opensource added area: migrations Issues related to `ng update` migrations core: control flow Issues related to the built-in control flow (@if, @for, @switch) labels Feb 23, 2024
@ngbot ngbot bot modified the milestone: needsTriage Feb 23, 2024
crisbeto added a commit to crisbeto/angular that referenced this issue Feb 23, 2024
… a long tag name and angle bracket on a new line

Fixes an edge case where a single-line elemnt with a long tag name a closing bracket on a new line was putting the control flow migration into an infinite loop.

Fixes angular#54587.
@crisbeto crisbeto self-assigned this Feb 23, 2024
dylhunn pushed a commit that referenced this issue Feb 23, 2024
… a long tag name and angle bracket on a new line (#54588)

Fixes an edge case where a single-line elemnt with a long tag name a closing bracket on a new line was putting the control flow migration into an infinite loop.

Fixes #54587.

PR Close #54588
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: migrations Issues related to `ng update` migrations core: control flow Issues related to the built-in control flow (@if, @for, @switch) state: has PR
Projects
None yet
3 participants