Код: Выделить всё
import { Component, inject, OnInit } from '@angular/core';
import { ReclamationService } from '../services/reclamation-service';
import { JsonPipe } from '@angular/common';
@Component({
selector: 'app-reclamer',
imports: [JsonPipe],
templateUrl: './liste-reclamation.html',
styleUrl: './liste-reclamation.css',
})
export class ListeReclamation implements OnInit {
private reclamtionService = inject(ReclamationService);
user !: any;
liste!:any;
ngOnInit(): void {
this.reclamtionService.getReclamations().subscribe(
res=>{
this.liste=res.reclamation
console.log(res)
}
)
}
}
это проблема, с которой я столкнулся с тех пор, как начал изучать Angular, и я не знаю, в чем причина.>
Подробнее здесь: https://stackoverflow.com/questions/798 ... n-api-call
Мобильная версия