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
Conversation
@@ -11,7 +11,9 @@ export class HighlightDirective { | |||
@Input() defaultColor = ''; | |||
// #enddocregion defaultColor | |||
|
|||
// #docregion highlightColor |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
You can preview 89eb30a at https://pr44628-89eb30a.ngbuilds.io/. |
This PR was merged into the repository by commit 7f51f1d. |
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
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Improve docs "Understanding Angular-Directives-Attribute Directives"
In
highlight.directive.1.ts
, add theprivate
keyword forel
propertyto 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?
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 theprivate
keyword forel
property to make it correct and consistent with subsequent examples.After:
For section "Setting the value with user input", add a step to tell the reader change the method
onMouseEnter
, thus more readable.After:
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
Does this PR introduce a breaking change?
Other information