aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/compile.js
diff options
context:
space:
mode:
authorIgor Minar2012-05-02 16:34:54 -0700
committerIgor Minar2012-05-03 00:15:26 -0700
commitbd530e225750e9b30b6300fc3d7447a5f1071667 (patch)
tree1e714d634691fa13af55163b038d2d276a9dfb42 /src/ng/compile.js
parent843f762c573e38a044f920c5575c6feb46bc7226 (diff)
downloadangular.js-bd530e225750e9b30b6300fc3d7447a5f1071667.tar.bz2
chore($compile): remove obsolete <<CONTENT>> transclusion
This stuff was never documented and is an accidental leftover from the time when the compiler was rewritten. If any code depends on this, it should be rewritten to use ngTransclude directive intead.
Diffstat (limited to 'src/ng/compile.js')
-rw-r--r--src/ng/compile.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ng/compile.js b/src/ng/compile.js
index d0b6e749..17f49d68 100644
--- a/src/ng/compile.js
+++ b/src/ng/compile.js
@@ -127,7 +127,6 @@ function $CompileProvider($provide) {
Suffix = 'Directive',
COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,
CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/,
- CONTENT_REGEXP = /\<\<content\>\>/i,
HAS_ROOT_ELEMENT = /^\<[\s\S]*\>$/;
@@ -569,9 +568,7 @@ function $CompileProvider($provide) {
assertNoDuplicate('template', templateDirective, directive, element);
templateDirective = directive;
- // include the contents of the original element into the template and replace the element
- var content = directiveValue.replace(CONTENT_REGEXP, element.html());
- templateNode = jqLite(content)[0];
+ templateNode = jqLite(directiveValue)[0];
if (directive.replace) {
replaceWith(rootElement, element, templateNode);
@@ -593,7 +590,7 @@ function $CompileProvider($provide) {
ii = directives.length;
} else {
- element.html(content);
+ element.html(directiveValue);
}
}
@@ -828,7 +825,6 @@ function $CompileProvider($provide) {
$http.get(asyncWidgetDirective.templateUrl, {cache: $templateCache}).
success(function(content) {
- content = trim(content).replace(CONTENT_REGEXP, html);
if (replace && !content.match(HAS_ROOT_ELEMENT)) {
throw Error('Template must have exactly one root element: ' + content);
}