Used fork join to call dropdown list
loadDropdownData() {
forkJoin({
countries: this.masterservice.GetCountries(),
divisions: this.masterservice.GetDivisions(),
locations: this.masterservice.GetLocations()
}).subscribe({
next: (res:any) => {
this.countries = res.countries;
this.divisions = res.divisions;
this.locations = res.locations;
console.log(res);
},
error: (err) => {
console.error('Error loading dropdown data', err);
}
});
}
No comments:
Post a Comment