Skip to content

Commit c84cbd8

Browse files
petebacondarwinjamesdaily
authored andcommitted
docs(error/compile/tplrt): split long lines
1 parent 83d9c82 commit c84cbd8

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

docs/content/error/compile/tplrt.ngdoc

+12-5
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
@fullName Invalid Template Root
44
@description
55

6-
When a directive is declared with `template` (or `templateUrl`) and `replace` mode on, the template must have exactly one root element.
7-
That is, the text of the template property or the content referenced by the templateUrl must be contained within a single html element.
6+
When a directive is declared with `template` (or `templateUrl`) and `replace` mode on, the template
7+
must have exactly one root element. That is, the text of the template property or the content
8+
referenced by the templateUrl must be contained within a single html element.
89
For example, '<p>blah <em>blah</em> blah</p>' instead of simply 'blah <em>blah</em> blah'.
9-
Otherwise, the replacement operation would result in a single element (the directive) being replaced with multiple elements or nodes, which is unsupported and not commonly needed in practice.
10+
Otherwise, the replacement operation would result in a single element (the directive) being replaced
11+
with multiple elements or nodes, which is unsupported and not commonly needed in practice.
1012

1113

1214
For example a directive with definition:
15+
1316
```
1417
myModule.directive('myDirective', function factory() {
1518
return {
@@ -21,12 +24,16 @@ myModule.directive('myDirective', function factory() {
2124
});
2225
```
2326

24-
And a template provided at URL `someUrl`. The template must be an html fragment that has only a single root element, like the `div` element in this template:
27+
And a template provided at URL `someUrl`. The template must be an html fragment that has only a
28+
single root element, like the `div` element in this template:
29+
2530
```
2631
<div><b>Hello</b> World!</div>
2732
```
2833

29-
An an invalid template to be used with this directive is one that defines multiple root nodes or elements. For example:
34+
An an invalid template to be used with this directive is one that defines multiple root nodes or
35+
elements. For example:
36+
3037
```
3138
<b>Hello</b> World!
3239
```

0 commit comments

Comments
 (0)