Skip to content

Bug: setting [disabled] attribute no longer works with formControlName #48350

@leandrotassi

Description

@leandrotassi

Command

other

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

Angular 14

Description

When upgrading from Angular 14 to Angular 15 the [Disabled] directive of form controls stopped working.

Is this a bug or did something change?

I'm using version 15.0.2

Minimal Reproduction

<button type="button" id="btnAddPeopleEditor" class="btn btn-success btn-sm" (click)="addPeople(1)"
[disabled]="disabledEditEditor || (habilitarControle(isReadOnly) == 'true')">
Add

Exception or Error

No error occurs. It simply stopped working.

Your Environment

Angular CLI: 15.0.2
Node: 16.17.0
Package Manager: npm 8.18.0
OS: win32 x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1500.2
@angular-devkit/build-angular   15.0.2
@angular-devkit/core            15.0.2
@angular-devkit/schematics      15.0.2
@angular/cdk                    15.0.1
@angular/material               15.0.1
@nguniversal/builders           15.0.0
@nguniversal/common             15.0.0
@nguniversal/express-engine     15.0.0
@schematics/angular             15.0.2
rxjs                            7.5.7
typescript                      4.8.4

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfularea: formsbugforms: directivesregressionIndicates than the issue relates to something that worked in a previous versionstate: confirmedworkaround2: non-obvious

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions