Skip to content

Commit 95fff0e

Browse files
MeAkibpkozlowski-opensource
authored andcommitted
docs: align list formatting and improve emphasis
Aligns list formatting, replaces the “Helpful” block with an IMPORTANT note for better visibility, and removes the separate example file by inlining the single relevant line directly in the documentation.
1 parent 86bbc94 commit 95fff0e

3 files changed

Lines changed: 13 additions & 14 deletions

File tree

adev/src/content/examples/attribute-directives/src/app/app.component.avoid.html

Lines changed: 0 additions & 3 deletions
This file was deleted.

adev/src/content/examples/attribute-directives/src/app/highlight.directive.0.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

adev/src/content/guide/directives/attribute-directives.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ This section walks you through creating a highlight directive that sets the back
1414

1515
The CLI creates `src/app/highlight.directive.ts`, a corresponding test file `src/app/highlight.directive.spec.ts`.
1616

17-
<docs-code header="highlight.directive.ts" path="adev/src/content/examples/attribute-directives/src/app/highlight.directive.0.ts"/>
17+
```angular-ts
18+
import {Directive} from '@angular/core';
19+
20+
@Directive({
21+
selector: '[appHighlight]',
22+
})
23+
export class HighlightDirective {}
24+
```
1825

1926
The `@Directive()` decorator's configuration property specifies the directive's CSS attribute selector, `[appHighlight]`.
2027

@@ -25,11 +32,13 @@ This section walks you through creating a highlight directive that sets the back
2532

2633
1. Add logic to the `HighlightDirective` class that sets the background to yellow.
2734

28-
<docs-code header="highlight.directive.ts" path="adev/src/content/examples/attribute-directives/src/app/highlight.directive.1.ts"/>
35+
<docs-code header="highlight.directive.ts" path="adev/src/content/examples/attribute-directives/src/app/highlight.directive.1.ts"/>
2936

30-
HELPFUL: Directives _do not_ support namespaces.
37+
IMPORTANT: Directives _do not_ support namespaces.
3138

32-
<docs-code header="app.component.avoid.html (unsupported)" path="adev/src/content/examples/attribute-directives/src/app/app.component.avoid.html" region="unsupported"/>
39+
```angular-html {avoid}
40+
<p app:Highlight>This is invalid</p>
41+
```
3342

3443
## Applying an attribute directive
3544

0 commit comments

Comments
 (0)