Created
January 3, 2025 12:31
-
-
Save diegoolipa/f574cbad7e7fe502ecaf43a1add53b42 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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