apps/live-weather/src/app/core/places/places.service.ts
Properties |
|
Methods |
|
constructor(http: HttpClient)
|
||||||||
Initializes a new instance of the
Parameters :
|
Public getAllPlaces |
getAllPlaces()
|
Get All places from json
Returns :
IPlace[]
All the places in json |
Public getAllPlacesFromServer |
getAllPlacesFromServer()
|
Get All places from json
Returns :
Promise<boolean>
promise resolver for place data |
Public getPlaceById | ||||||||
getPlaceById(id: number)
|
||||||||
Get place by id
Parameters :
Returns :
IPlace
Place which is matched with passed param |
Public getPlacesByName | ||||||||
getPlacesByName(name: string)
|
||||||||
Get all places by name
Parameters :
Returns :
IPlace[]
All the places which were matched with passed param |
Private places |
Type : IPlace[]
|
Default value : []
|