Skip to content

Instantly share code, notes, and snippets.

@diegoolipa
Created January 3, 2025 12:31
Show Gist options
  • Save diegoolipa/f574cbad7e7fe502ecaf43a1add53b42 to your computer and use it in GitHub Desktop.
Save diegoolipa/f574cbad7e7fe502ecaf43a1add53b42 to your computer and use it in GitHub Desktop.
public getYears() {
this.loadingTable = true;
this.yearsService.getAll$()
.pipe(
map(resp => resp.data),
finalize(() => {
this.loadingTable = false;
})
)
.subscribe({
next: (response) => {
this.loadingTable = false;
this.years = response;
},
error: (error) => {
this.loadingTable = false;
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment