aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/guide/dev_guide.compiler.extending_compiler.ngdoc
diff options
context:
space:
mode:
authorIgor Minar2011-07-29 12:45:10 -0700
committerIgor Minar2011-07-29 12:46:54 -0700
commita79231dea6cd13849c1a72d447f367e8c5053537 (patch)
treec8f96ba0128df52c5c6f54e034eced9839615d57 /docs/content/guide/dev_guide.compiler.extending_compiler.ngdoc
parent3e54a1b18ab698d55e1642a120f95ea3adf6af1b (diff)
downloadangular.js-a79231dea6cd13849c1a72d447f367e8c5053537.tar.bz2
doc(guide): various fixes and improvements
Diffstat (limited to 'docs/content/guide/dev_guide.compiler.extending_compiler.ngdoc')
-rw-r--r--docs/content/guide/dev_guide.compiler.extending_compiler.ngdoc12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/content/guide/dev_guide.compiler.extending_compiler.ngdoc b/docs/content/guide/dev_guide.compiler.extending_compiler.ngdoc
index 88a9a470..49e83b74 100644
--- a/docs/content/guide/dev_guide.compiler.extending_compiler.ngdoc
+++ b/docs/content/guide/dev_guide.compiler.extending_compiler.ngdoc
@@ -8,7 +8,7 @@ We want this HTML source:
<pre>
<div ng:init="s='Hello'; n='World'">
- <my:greeter salutation="s" name="n"/>
+ <my:greeter salutation="s" name="n"></my:greeter>
</div>
</pre>
@@ -23,9 +23,9 @@ to produce this DOM:
</div>
</pre>
-That is, the new `<my:greeter/>` tag's `salutation` and `name` attributes should be transformed by
-the compiler such that two `<span>` tags display the values of the attributes, with CSS classes
-applied to the output.
+That is, the new `<my:greeter></my:greeter>` tag's `salutation` and `name` attributes should be
+transformed by the compiler such that two `<span>` tags display the values of the attributes, with
+CSS classes applied to the output.
The following code snippet shows how to write a following widget definition that will be processed
by the compiler. Note that you have to declare the {@link dev_guide.bootstrap namespace} `my` in
@@ -41,9 +41,9 @@ angular.widget('my:greeter', function(compileElement){
var salutationSpan = angular.element('<span class="salutation"></span');
var nameSpan = angular.element('<span class="name"></span>');
linkElement.append(salutationSpan);
- linkElement.append(compiler.text(' '));
+ linkElement.append(' ');
linkElement.append(nameSpan);
- linkElement.append(compiler.text('!'));
+ linkElement.append('!');
this.$watch(salutationExp, function(value){
salutationSpan.text(value);
});