Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Qarun-Qadir-Bissoondial/3bc463a894a8dbb97da7c9d0c7bc7fa2 to your computer and use it in GitHub Desktop.
Save Qarun-Qadir-Bissoondial/3bc463a894a8dbb97da7c9d0c7bc7fa2 to your computer and use it in GitHub Desktop.
Pipes Demo - Currency Pipe
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