aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMisko Hevery2010-10-26 22:02:24 -0700
committerMisko Hevery2010-10-27 15:42:46 -0700
commit62c0e5c46091d8b98a20c31ab26e715bad574bae (patch)
tree18e73b82cb9017b9e9b66d3ec094c53ce0b633a8 /docs
parentc67af8a03819004c4aaa775805badd1e631af738 (diff)
downloadangular.js-62c0e5c46091d8b98a20c31ab26e715bad574bae.tar.bz2
Fix failing tests for ie, and mark elements as ng-widget, ng-directive, and ng-binding
Diffstat (limited to 'docs')
-rw-r--r--docs/filter:currency.html21
-rw-r--r--docs/filter:currency.md20
2 files changed, 41 insertions, 0 deletions
diff --git a/docs/filter:currency.html b/docs/filter:currency.html
new file mode 100644
index 00000000..bd277bb8
--- /dev/null
+++ b/docs/filter:currency.html
@@ -0,0 +1,21 @@
+<h1>filter:currency</h1>
+
+<p>formats a number as a currency (ie $1,234.56)</p>
+
+<p>@format <em>expression</em> | currency</p>
+
+<p><example>
+<input type="text" name="amount" value="1234.56"/> <br/>
+{{amount | currency}}
+</example></p>
+
+<p><test>
+ it('should init with 1234.56', function(){
+ expect(bind('amount')).toEqual('$1,234.56');
+ });
+ it('should update', function(){
+ element(':input[name=amount]').value('-1234');
+ expect(bind('amount')).toEqual('-$1,234.00');
+ expect(bind('amount')).toHaveColor('red');
+ });
+</test></p>
diff --git a/docs/filter:currency.md b/docs/filter:currency.md
new file mode 100644
index 00000000..44687a91
--- /dev/null
+++ b/docs/filter:currency.md
@@ -0,0 +1,20 @@
+# filter:currency
+formats a number as a currency (ie $1,234.56)
+
+@format _expression_ | currency
+
+<example>
+<input type="text" name="amount" value="1234.56"/> <br/>
+{{amount | currency}}
+</example>
+
+<test>
+ it('should init with 1234.56', function(){
+ expect(bind('amount')).toEqual('$1,234.56');
+ });
+ it('should update', function(){
+ element(':input[name=amount]').value('-1234');
+ expect(bind('amount')).toEqual('-$1,234.00');
+ expect(bind('amount')).toHaveColor('red');
+ });
+</test> \ No newline at end of file