Skip to content

Instantly share code, notes, and snippets.

@cezar-plescan
Last active April 17, 2024 12:16
isLoadRequestInProgress boolean flag
protected isLoadRequestInProgress = false;
private loadUserData() {
// set the loading flag when the request is initiated
this.isLoadRequestInProgress = true;
this.getUserData$().subscribe(userData => {
// clear the loading flag when the request completes
this.isLoadRequestInProgress = false;
// display the user data in the form
this.updateForm(userData);
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment