-
Notifications
You must be signed in to change notification settings - Fork 875
docs(attribute-directives): copyedits + fix e2e warning #3330
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,3 @@ import { Component } from '@angular/core'; | |
export class AppComponent { | ||
color = 'yellow'; | ||
} | ||
// #enddocregion class |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,17 +10,6 @@ export class HighlightDirective { | |
// #docregion ctor | ||
constructor(private el: ElementRef) { } | ||
// #enddocregion ctor | ||
// #enddocregion | ||
|
||
// #docregion color | ||
@Input() highlightColor: string; | ||
// #enddocregion color | ||
|
||
// #docregion color-2 | ||
@Input() myHighlight: string; | ||
// #enddocregion color-2 | ||
|
||
// #docregion | ||
|
||
// #docregion mouse-methods, host | ||
@HostListener('mouseenter') onMouseEnter() { | ||
|
@@ -39,7 +28,14 @@ export class HighlightDirective { | |
private highlight(color: string) { | ||
this.el.nativeElement.style.backgroundColor = color; | ||
} | ||
// #enddocregion mouse-methods | ||
// #enddocregion mouse-methods, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the move? Linter complains when properties follow methods. I hate that particular "rule" (what's the point?) and often disable it for a particular file but I don't see you doing that here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The file starts with
and so the linter is happy (i.e., the build is green). The move was so as to put all the extra "snippets" (not actually meant to be part of the class's default docregion), at the end. (Btw, those two members were already "out of order". I figured that if they are going to be out-of-order, then might as well be at the end of the real class members.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. k |
||
|
||
// #docregion color | ||
@Input() highlightColor: string; | ||
// #enddocregion color | ||
|
||
// #docregion color-2 | ||
@Input() myHighlight: string; | ||
// #enddocregion color-2 | ||
} | ||
// #enddocregion | ||
|
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 know that you can combine named and the unnamed region in a single line like this. I'm not sure that it helps the reader. Those trailing commas are hard to pick up. But let's forge ahead with this change.
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.
Ok, I'll refrain from combining them in the future (I just find excessive docregion lines distracting when trying to read the source).