After developing a web app using Angular with backend Laravel, I encountered an issue where my Angular page was not displaying the backend data. Below is my data service.ts file:
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Injectable({
providedIn: 'root'
})
export class DataService {
constructor(private httpClient:HttpClient) { }
getData() {
return this.httpClient.get('http://127.0.0.1:8000/api/employees');
}
}
Upon encountering the following error message:
expected onespace after colon in parameter (typedef-whitespace)
missing whitespace (whitespace)
expected call-signature: 'getData' to have a typedef (typedef)
I am now seeking guidance on how to resolve these issues. Any advice would be greatly appreciated.