0

I am using below code calling API which is working fine. Now I don't want to call API instead just return a true value. When I return true throwing error

export interface EmployeeStatus{
  hasActive: boolean;
}


 public getStatus(Id: number): Observable<EmployeeStatus> {
     return true;
      //return this.http.get<EmployeeStatus>(`APIurl`);
  }
Shakeer Hussain
  • 2,230
  • 7
  • 29
  • 52

1 Answers1

0

I have resolved as below for custom modal.

public getStatus(Id: number): Observable<EmployeeStatus> {
     const employeeStatus={hasActive:true}
      return of(employeeStatus)
  }
Shakeer Hussain
  • 2,230
  • 7
  • 29
  • 52