mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-16 18:51:06 +00:00
parent
9f2c8e935a
commit
81d5bc860d
1 changed files with 3 additions and 3 deletions
|
|
@ -4,9 +4,9 @@
|
||||||
@description
|
@description
|
||||||
|
|
||||||
When a directive is declared with `template` (or `templateUrl`) and `replace` mode on, the template must have exactly one root element.
|
When a directive is declared with `template` (or `templateUrl`) and `replace` mode on, the template must have exactly one root element.
|
||||||
That is, the text of the template property or the referenced by the templateUrl must be contained within an html elemen.
|
That is, the text of the template property or the content referenced by the templateUrl must be contained within a single html element.
|
||||||
For example, '<p>blah blah blah</p>' instead of simply 'blah blah blah'.
|
For example, '<p>blah <em>blah</em> blah</p>' instead of simply 'blah <em>blah</em> blah'.
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
|
||||||
For example a directive with definition:
|
For example a directive with definition:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue