In my last post I demonstrated how to make an Angular loading indicator without the CDK. In this post I will show you how to make an loading indicator using CDK that does not rely on observables and it supports promises and resources as well as observables.
Loading Component
Fist lets create our component that will simply contain the backdrop and indicator
loader-component.ts
import { Component , ChangeDetectionStrategy } from ' @angular/core ' ;
@ Component ({ selector : ' app-loader ' , templateUrl : ' ./loader-component.html ' , styleUrls : [ ' ./loader-component.scss ' ], changeDetection : ChangeDetectionStrategy .…