Skip to main content

Posts

Showing posts with the label 7 CurrencyPipe

What Is Angular AsyncPipe?

Angular AsyncPipe  – Angular provide a special kind of pipe that are called AsyncPipe and the AsyncPipe subscribes to an observable or promise and returns the latest value it has emitted. The AsyncPipe allows you to bind your HTML templates directly to values that arrive asynchronously manner that is a great ability for the promises and observables. The expression with Async pipe- {{  obj_expression  |  async  }} OR < ul >< li  * ngFor = "let account of accounts | async" > {{account.ACNo }} </ li ></ ul > The object expression can be observable, promise, null, or undefined. The example for AsyncPipe - @ Component ({    selector:   'app-async-pipe' ,    template: `<ul><li *ngFor="let account of accounts | async">    A/C No- {{account.ACNo }} </li></ul>` ,    styleUrls:  [ './async-pipe.component.css' ] }) export   c...

What Is Angular CurrencyPipe?

Angular CurrencyPipe  – The CurrencyPipe is used to format a currency with help of locale rules. {{  value_expression  |  currency  [ :  currencyCode  [ :  display  [ :  digitsInfo  [ :  locale  ] ] ] ] }} The CurrencyPipe formats a number as a currency of a specific country. It takes country currency type as a parameter. The example for the currency pipe – < tr >    < td > {{employee.salary | currency}} </ td >      < td > {{employee.salary | currency : 'INR'}} </ td >      < td > {{employee.salary | currency : 'INR' : true : '6.2'}} </ td > </ tr > For more detail kindly refer this link click…