Table not loaded Anqular Api using Spring Boot

Viewed 14

i am beginner of spring boot application. When i check through console data is loaded successfully.but not passing to the table rows i don't why. what i tried so far i attached below.please check on that

Product.componenet.ts

productsArray : any[] = [];
  constructor(private http: HttpClient) { }

  ngOnInit(): void {
    this.getAllProducts();
  }

  getAllProducts()
  { 
    let testObserable =this.http.get("http://localhost:8088/api/v1/employee/get-all-employees"); 
    testObserable.subscribe((resultData: any)=>
    {
        console.log(resultData);
        this.productsArray = resultData.data;
    });
  }

Product.components.html

{{productItem.employeeId}} {{productItem.employeeName}} {{productItem.employeeSalary | currency: 'USD'}}

i have checked through console

0
: 
{employeeId: 1, employeeName: 'Uma', employeeAddress: 'UK', employeeSalary: 60000, contactNumbers: Array(2), …}
1
: 
{employeeId: 3, employeeName: 'Kobi', employeeAddress: 'India', employeeSalary: 70000, contactNumbers: Array(2), …}
2
: 
{employeeId: 4, employeeName: 'dfd', employeeAddress: 'india', employeeSalary: 23340, contactNumbers: Array(1), …}
3
: 
{employeeId: 5, employeeName: 'Ramesh', employeeAddress: 'india', employeeSalary: 30000, contactNumbers: Array(1), …}
length
: 
4
[[Prototype]]
: 
Array(0)
0 Answers
Related