angular purpose of async pipe code example

Example 1: why async pipe should be used in angular

Async pipe automatically unsubscribes the observable thus saving some lines of code
Async pipe utilizes on push change detection strategy which is good for performance.

Example 2: angular pass async pipe value to funciton

<div *ngIf="(match | async) as match" class="team" (click)="addToFavorite(match.id)">

Example 3: angular http async false

// add async:false to config like so to make http call blocking
return $http({
            url : 'https://mywebsite.com/api_whatever.php'
            method : 'GET',
            async : false
        }).success(function(data) {;

        };