aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMisko Hevery2010-11-08 20:34:18 -0800
committerMisko Hevery2010-11-09 09:15:29 -0800
commitc048f0d8e8385e96e9fff0b4ff733cecfa726d93 (patch)
treeafb32329985985e2c0beec3fd5f9ad38389a80c5 /docs
parent96e37a08666f4000cbba6f77a4b362a3480c934b (diff)
downloadangular.js-c048f0d8e8385e96e9fff0b4ff733cecfa726d93.tar.bz2
Added formatter documentation.
Diffstat (limited to 'docs')
-rw-r--r--docs/formatter.template24
-rw-r--r--docs/overview.template4
2 files changed, 26 insertions, 2 deletions
diff --git a/docs/formatter.template b/docs/formatter.template
new file mode 100644
index 00000000..19611ca1
--- /dev/null
+++ b/docs/formatter.template
@@ -0,0 +1,24 @@
+<h1><tt>{{name}}</tt></h1>
+<h2>Description</h2>
+{{{description}}}
+
+<h2>Usage</h2>
+<h3>In HTML Template Binding</h3>
+<tt>
+ &lt;input type="text" ng:format="{{shortName}}"&gt;
+</tt>
+<h3>In JavaScript</h3>
+<tt ng:non-bindable>
+var userInputString = angular.formatter.{{shortName}}.format(modelValue);<br/>
+var modelValue = angular.formatter.{{shortName}}.parse(userInputString);
+</tt>
+
+<h3>Returns</h3>
+{{{returns}}}
+
+<h3>CSS</h3>
+{{{css}}}
+
+<WIKI:SOURCE style="display:block;">
+{{{example}}}
+</WIKI:SOURCE> \ No newline at end of file
diff --git a/docs/overview.template b/docs/overview.template
index 61fd426f..f7540999 100644
--- a/docs/overview.template
+++ b/docs/overview.template
@@ -1,6 +1,6 @@
<h1><tt>{{name}}</tt></h1>
{{{description}}}
-<WIKI:SOURCE style="display:block;">
+{{#example}}<WIKI:SOURCE style="display:block;">{{/example}}
{{{example}}}
-</WIKI:SOURCE>
+{{#example}}</WIKI:SOURCE>{{/example}}