Skip to content

docs(input): remove extra parens and fix nits - #6614

Merged
kara merged 1 commit into
angular:masterfrom
willshowell:patch-3
Aug 24, 2017
Merged

docs(input): remove extra parens and fix nits#6614
kara merged 1 commit into
angular:masterfrom
willshowell:patch-3

Conversation

@willshowell

Copy link
Copy Markdown
Contributor

No description provided.

@googlebotgooglebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 23, 2017
The only limitations are that the `type` attribute can only be one of the values supported by
`mdInput` and the native element cannot specify a `placeholder` attribute if the `md-form-field`
also contains a `md-placeholder` element.
also contains an `md-placeholder` element.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a was correct, no?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arguably haha. I'm basing it on the pronunciation of "md" sounding like "em dee". See APA blog referencing the subject.

// Error when invalid control is dirty, touched, or submitted
const isSubmitted = form && form.submitted;
return !!(control.invalid && (control.dirty || control.touched || isSubmitted)));
return !!(control.invalid && (control.dirty || control.touched || isSubmitted));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coercion here seems to be unnecessary since all fields are boolean.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it is unnecessary, but it's based on the default errorStateMatcher which originates from #3560 (comment).

Happy to change it if coercion is unnecessary, but it does add a little type safety. A little more discussion in #6585

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has an effect because isSubmitted is potentially undefined (if form is undefined)

@jelbournjelbourn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// Error when invalid control is dirty, touched, or submitted
const isSubmitted = form && form.submitted;
return !!(control.invalid && (control.dirty || control.touched || isSubmitted)));
return !!(control.invalid && (control.dirty || control.touched || isSubmitted));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has an effect because isSubmitted is potentially undefined (if form is undefined)

@jelbournjelbourn added docs This issue is related to documentation pr: lgtm action: merge The PR is ready for merge by the caretaker labels Aug 23, 2017
@kara
kara merged commit f104101 into angular:masterAug 24, 2017
@willshowell
willshowell deleted the patch-3 branch August 24, 2017 17:15
@angular-automatic-lock-bot

Copy link
Copy Markdown

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-botangular-automatic-lock-botBot locked and limited conversation to collaborators Sep 6, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: mergeThe PR is ready for merge by the caretakercla: yesPR author has agreed to Google's Contributor License AgreementdocsThis issue is related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@willshowell@jelbourn@rafaelss95@kara@googlebot