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

Angular control flow fails during certain cases #55882

Open
laijuthomas opened this issue May 20, 2024 · 1 comment
Open

Angular control flow fails during certain cases #55882

laijuthomas opened this issue May 20, 2024 · 1 comment
Labels
area: core Issues related to the framework runtime core: control flow Issues related to the built-in control flow (@if, @for, @switch) needs reproduction This issue needs a reproduction in order for the team to investigate further
Milestone

Comments

@laijuthomas
Copy link

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

common

Is this a regression?

Yes

Description

I have a if else block in my html page which was working fine until I upgraded to angular 17 control flow

@if(!isMobile){}
this is how I added the condition, the condition is to show some html based on a boolean variable (which is set using a behaviorsubject). This fails while reloading the page. but when I add an empty @else block, this works without any issue

any idea why this happens?

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

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

Angular CLI: 17.3.6
Node: 20.11.1
Package Manager: npm 10.2.4
OS: darwin arm64

Angular: 17.3.6
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker, ssr

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.6
@angular-devkit/build-angular   17.3.6
@angular-devkit/core            17.3.6
@angular-devkit/schematics      17.3.6
@schematics/angular             17.3.6
rxjs                            7.8.1
typescript                      5.3.3
zone.js                         0.14.4

Anything else?

No response

@JoostK
Copy link
Member

JoostK commented May 20, 2024

Please provide a runnable reproduction, as without it we cannot investigate.

@JoostK JoostK added the needs reproduction This issue needs a reproduction in order for the team to investigate further label May 20, 2024
@pkozlowski-opensource pkozlowski-opensource added area: core Issues related to the framework runtime core: control flow Issues related to the built-in control flow (@if, @for, @switch) labels May 22, 2024
@ngbot ngbot bot added this to the Backlog milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues related to the framework runtime core: control flow Issues related to the built-in control flow (@if, @for, @switch) needs reproduction This issue needs a reproduction in order for the team to investigate further
Projects
None yet
Development

No branches or pull requests

3 participants