Angular

Angular KeyValue Pipe

The KeyValue Pipe converts given Object or Map into an array of key-value pairs. We can use this with the ngFor to loop through the object keys. The keyValue accepts the one argument compareFn, which we can use to set the custom sort to the pipe. In this tutorial, let us learn how to make use of KeyValue pipe with example.

Angular KeyValue Pipe Read More »

Using Angular Async Pipe with ngIf & ngFor

The async pipe allows us to subscribe to an Observable or Promise from the template and returns the value emitted. The async pipes subscribe to the observable when the component loads. It unsubscribes when the component gets destroyed. In this tutorial we will show you how to use async pipe. Its Syntax & example using observable, Also we will show you how to use it with ngIf & ngFor. How to make use of the ShareReplay to share the subscription. Use the as operator to store the result. using it with the httpclient & HTTP get request etc.

Using Angular Async Pipe with ngIf & ngFor Read More »

Scroll to Top