Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 1c0218b

Browse files
chalinthso
authored andcommitted
docs(dev guide): attribute-directives - move html excerpt to .html file (#1313)
Jade can’t parse inlined Angular adorned HTML properly, so it is best to put such source in a file and include with `makeExample`.
1 parent e958be2 commit 1c0218b

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
<!-- #docregion -->
22
<h1>My First Attribute Directive</h1>
33
<p myHighlight>Highlight me!</p>
4+
<!-- #enddocregion -->
5+
<!-- #docregion p-style-background -->
6+
<p [style.background]="'lime'">I am green with envy!</p>
7+
<!-- #enddocregion p-style-background -->

public/docs/_examples/attribute-directives/ts/app/app.component.1.html

+3
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
<h1>My First Attribute Directive</h1>
33
<p myHighlight>Highlight me!</p>
44
<!-- #enddocregion -->
5+
<!-- #docregion p-style-background -->
6+
<p [style.background]="'lime'">I am green with envy!</p>
7+
<!-- #enddocregion p-style-background -->

public/docs/ts/latest/guide/attribute-directives.jade

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ p.
3636
:marked
3737
We don't need *any* directive to simply set the background color.
3838
We can set it with the special [Style Binding](template-syntax.html#style-binding) like this:
39-
code-example(language="html" escapse="html").
40-
<p [style.background]="'lime'">I am green with envy!</p>
39+
40+
+makeExample('attribute-directives/ts/app/app.component.1.html','p-style-background')
4141

4242
:marked
4343
That wouldn't be nearly as much fun as creating our own directive.

0 commit comments

Comments
 (0)