aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/guide/dev_guide.compiler.widgets.creating_widgets.ngdoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/guide/dev_guide.compiler.widgets.creating_widgets.ngdoc')
-rw-r--r--docs/content/guide/dev_guide.compiler.widgets.creating_widgets.ngdoc8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/content/guide/dev_guide.compiler.widgets.creating_widgets.ngdoc b/docs/content/guide/dev_guide.compiler.widgets.creating_widgets.ngdoc
index 906e0127..674f98aa 100644
--- a/docs/content/guide/dev_guide.compiler.widgets.creating_widgets.ngdoc
+++ b/docs/content/guide/dev_guide.compiler.widgets.creating_widgets.ngdoc
@@ -11,7 +11,7 @@ expression and `alert()` the user with each new value:
<pre>
// An element widget
-<my:watch exp="name"/>
+<my:watch exp="name"></my:watch>
</pre>
You can implement `my:watch` like this:
@@ -36,8 +36,8 @@ Let's implement the same widget as in the example in Defining an Element Widget,
an attribute that can be added to any existing DOM element:
<pre>
-// An attribute widget (my-watch) in a div tag
-<div my-watch="name">text</div>
+// An attribute widget (my:watch) in a div tag
+<div my:watch="name">text</div>
</pre>
You can implement `my:watch` attribute like this:
<pre>
@@ -45,7 +45,7 @@ angular.widget('@my:watch', function(expression, compileElement) {
var compiler = this;
return function(linkElement) {
var currentScope = this;
- currentScope.$watch(expression, function(value){
+ currentScope.$watch(expression, function(value) {
alert(value);
});
};