Handling loading and error states with Angular’s async pipe

Handling loading and error states with Angular’s async pipe

Posted on December 17, 2020

Here’s a simple of way of handling loading and error states when using Angular’s async pipe. For larger applications I’d create a resuable ‘loading’ component to avoid code duplication. This also makes it easier to update if you need to tweak the markup. Component import {Component, OnInit} from ‘@angular/core’; import {ArticleService} from ‘../../services/article/article.service’; import {Observable} […]

… read more

See More