Created
March 30, 2020 00:01
-
-
Save Qarun-Qadir-Bissoondial/3bc463a894a8dbb97da7c9d0c7bc7fa2 to your computer and use it in GitHub Desktop.
Pipes Demo - Currency Pipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component} from '@angular/core'; | |
@Component({ | |
selector: 'app-currency-pipe', | |
template: ` | |
<h2>Currency Pipes!</h2> | |
<p>Our number: {{money}}</p> | |
<p>Currency Pipe: {{money | currency}}</p> | |
<p>Canadian Currency: {{money | currency:'CAD'}}</p> | |
<p>Indian Currency: {{money | currency:'INR'}}</p> | |
`, | |
styleUrls: [] | |
}) | |
export class CurrencyPipeComponent{ | |
money: number = 19.99; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment