diff options
Diffstat (limited to 'docs/content/guide/dev_guide.compiler.extending_compiler.ngdoc')
| -rw-r--r-- | docs/content/guide/dev_guide.compiler.extending_compiler.ngdoc | 12 | 
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);       }); | 
