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

docs(docs-infra): improve the content of attribute directives #44628

Closed
wants to merge 1 commit into from
Closed

docs(docs-infra): improve the content of attribute directives #44628

wants to merge 1 commit into from

Conversation

shejialuo
Copy link
Contributor

Improve docs "Understanding Angular-Directives-Attribute Directives"

In highlight.directive.1.ts, add the private keyword for el property
to make it correct and consistent with subsequent examples.

For section "Setting the value with user input", add a step to tell the
reader change the method onMouseEnter, thus more readable.

For section "Binding to a secon property", add a step to tell the reader
should add an alias because the docs doesn't mention it at all, thus
more readable.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

https://angular.io/guide/attribute-directives

Issue Number: N/A

What is the new behavior?

In highlight.directive.1.ts, add the private keyword for el property to make it correct and consistent with subsequent examples.

After:

image

For section "Setting the value with user input", add a step to tell the reader change the method onMouseEnter, thus more readable.

After:

image

For section "Binding to a second property", add a step to tell the reader should add an alias because the docs doesn't mention it at all, thus more readable

After

image

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from atscott January 5, 2022 10:09
@@ -11,7 +11,9 @@ export class HighlightDirective {
@Input() defaultColor = '';
// #enddocregion defaultColor

// #docregion highlightColor
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the intent of this tutorial was to introduce aliases. Can we instead change the code and content to consistently use appHighlight?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a good idea to consistently use appHighlight. And I have changed the PR.

Improve docs "Understanding Angular-Directives-Attribute Directives"

In `highlight.directive.1.ts`, add the `private` keyword for `el` property
to make it correct and consistent with subsequent examples.

For section "Setting the value with user input", add a step to tell the
reader change the method `onMouseEnter`, thus more readable.

For section "Binding to a second property", delete the aliase for the
`Input` property, and changes the name back to `appHighlight` in the code
to make it consistent with the whole tutorial.
@shejialuo shejialuo requested a review from atscott January 6, 2022 02:46
@atscott atscott added aio: preview comp: docs target: patch This PR is targeted for the next patch release labels Jan 6, 2022
@mary-poppins
Copy link

You can preview 89eb30a at https://pr44628-89eb30a.ngbuilds.io/.
You can preview 3c2d822 at https://pr44628-3c2d822.ngbuilds.io/.

@ngbot ngbot bot modified the milestone: Backlog Jan 6, 2022
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Jan 6, 2022
@atscott
Copy link
Contributor

atscott commented Jan 6, 2022

This PR was merged into the repository by commit 7f51f1d.

atscott pushed a commit that referenced this pull request Jan 6, 2022
Improve docs "Understanding Angular-Directives-Attribute Directives"

In `highlight.directive.1.ts`, add the `private` keyword for `el` property
to make it correct and consistent with subsequent examples.

For section "Setting the value with user input", add a step to tell the
reader change the method `onMouseEnter`, thus more readable.

For section "Binding to a second property", delete the aliase for the
`Input` property, and changes the name back to `appHighlight` in the code
to make it consistent with the whole tutorial.

PR Close #44628
@atscott atscott closed this in 7f51f1d Jan 6, 2022
@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 Feb 6, 2022
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 aio: preview target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants