Debug observable in Angular

Async pipe will automatically subscribe to observable. And json pipe will output all the data in json format.

{{ data$ | async | json }}

Resolve observable in Angular

<div *ngIf="user$ | async as user; else userEmpty">
  {{ }}
  {{ }}
<ng-template #userEmpty>
    User is empty

StackBlitz + Github + Angular

For example you have any github repo with Angular in it
You can execute this repo by accessing it via stackblitz like this:
It gives you file browser. All your changes reflect automatically.
This trick works with branches and commits too:{GH_USERNAME}/{REPO_NAME}/tree/{TAG|BRANCH|COMMIT}



Leave a Reply

Your email address will not be published. Required fields are marked *