blob: bd277bb8607b342a87d692ead065723660efecf5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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>
|