Skip to content

Control flow (@if etc) is not working when preserveWhitespaces is set to true in tsconfig #53114

@iKrishnaSahu

Description

@iKrishnaSahu

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

common

Is this a regression?

Yes

Description

Control flow (@if etc) is not working when preserveWhitespaces is set to true in tsconfig

As per the PR #52414, this seems like a breaking change.

Are we going to add support for preserveWhitespaces or what's the future plan?

Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/bjhzif?file=src%2Fexample%2Ftab-group-basic-example.html,tsconfig.json

Please provide the exception or error you saw

Content projection is not working

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

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


Angular CLI: 17.0.3
Node: 18.18.2
Package Manager: npm 8.19.3
OS: win32 x64

Angular: 17.0.4
... common, compiler, compiler-cli, core, elements, forms
... localize, platform-browser, platform-browser-dynamic, router
... upgrade

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1700.3
@angular-devkit/build-angular      17.0.3
@angular-devkit/core               17.0.3
@angular-devkit/schematics         17.0.3
@angular/animations                17.0.3
@angular/cdk                       17.0.1
@angular/cli                       17.0.3
@angular/material                  17.0.1
@angular/material-moment-adapter   17.0.1
@schematics/angular                17.0.3
ng-packagr                         17.0.1
rxjs                               7.8.1
typescript                         5.2.2
webpack                            5.89.0
zone.js                            0.14.2

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtimecore: control flowIssues related to the built-in control flow (@if, @for, @switch)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions