Angular

Angular Map Operator: Usage and Examples

The Angular observable Map operator takes an observable source as input. It applies a project function to each of the values emitted by that observable and transforms it into a new value. It then returns a new observable with the transformed values. The Map operator is pretty simple to use and is the most common operator that we use in Angular. We use a Map with a Pipe, which allows us to run multiple operators. You can also use Pipe to run multiple Map functions. In this guide, we’re going to learn how to use the Map operator with examples.

Angular Map Operator: Usage and Examples Read More »

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