I have this ngOnInit. the first subscribe works well and brings the value. The second one calls the backend, get the response (a non-null object) but it´s not setting this.taxas with the reponse value (yes, the type is correct and I can see the return on Postman). I guess it might be a problem because I´m calling multiples subscribes on ngOnInit but I don´t have any ideia how to fix it. Does someone have any idea?
ngOnInit() {
this.sharedService.getMonthValueObservable().subscribe(x => {
this.monthValue = x;
});
this.simuladorGvService.obterTaxasRecebaRapido(this.monthValue).subscribe(
response => {
this.taxas = response;
});
console.log(this.monthValue);
console.log(this.taxas);
}