From 33e1bdc543bcb7875dcc004d487333393670ed2d Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Sun, 16 Feb 2014 22:02:31 +0000 Subject: chore(errors): rename folders to match namespaces --- docs/content/error/$compile/tplrt.ngdoc | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 docs/content/error/$compile/tplrt.ngdoc (limited to 'docs/content/error/$compile/tplrt.ngdoc') diff --git a/docs/content/error/$compile/tplrt.ngdoc b/docs/content/error/$compile/tplrt.ngdoc new file mode 100644 index 00000000..3c29dbdc --- /dev/null +++ b/docs/content/error/$compile/tplrt.ngdoc @@ -0,0 +1,39 @@ +@ngdoc error +@name $compile:tplrt +@fullName Invalid Template Root +@description + +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 content +referenced by the templateUrl must be contained within a single html element. +For example, `
blah blah blah
` instead of simply `blah blah 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. + + +For example a directive with definition: + +``` +myModule.directive('myDirective', function factory() { + return { + ... + replace: true, + templateUrl: 'someUrl' + ... + } +}); +``` + +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: + +``` +