Skip to content

Conversation

kara
Copy link
Contributor

@kara kara commented Aug 11, 2016

Previously, status classes were only added to elements with individual form control directives like formControlName and ngModel.

This PR adds status classes to group-based form control directives like formGroupName, ngForm, etc.

** Before **

<form [ngClass]="{'invalid': f.invalid}" #f="ngForm">  <!-- add invalid class yourself -->
   <input name="first" ngModel required>
</form>

** After **

<form>    <!-- form already has ng-invalid class automatically -->
   <input name="first" ngModel>
</form>

This should not be a breaking change, but note that if you are selecting for all ng-invalid classes globally, this may affect your styles.

@kara kara added the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 11, 2016
@vsavkin vsavkin added pr_state: LGTM and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Aug 11, 2016
@kara kara added the action: merge The PR is ready for merge by the caretaker label Aug 11, 2016
@vikerman
Copy link
Contributor

Running TAP Presubmit...

@vikerman
Copy link
Contributor

TAP green. Merging...

@vikerman vikerman merged commit 2291929 into angular:master Aug 11, 2016
@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 Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: forms cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants