15 |
16 |
17 |
18 | {{stock.symbol.toUpperCase()}}
19 | {{stock.lastTradePriceOnly | currency:'USD':true:'.2'}}
20 | {{stock.change | currency:'USD':true:'.2'}} ({{stock.changeInPercent | percent}})
21 |
22 |
23 |
24 |
25 | `
26 | })
27 | export class Summary {
28 | stock: StockInterface;
29 |
30 | isNegative() {
31 | if (!this.stock || this.stock.change >= 0) {
32 | return false;
33 | }
34 |
35 | return true;
36 | }
37 |
38 | isPositive() {
39 | if (!this.stock || this.stock.change <= 0) {
40 | return false;
41 | }
42 |
43 | return true;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/client/components/app.ts:
--------------------------------------------------------------------------------
1 | ///