Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Get creates object #237

Description

@GrigoryTsuryev

THis is my class

export class FakeMemoryDbImplService {

SERVER_URL: string = "http://localhost:8080/api/";
constructor(private httpClient: HttpClient) { }

public getLocations() : Observable<Location[]> {
return this.httpClient.get<Location[]> (this.SERVER_URL + 'locations');
}
}

and when i am trying to call it using

export class LocationComponent {

onLocationsDisplay() {
this.dbservice.getLocations().subscribe((data: Location[]) => {
console.log(data);
});
}
}

it creates me a new object. What could be the issue?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions