Last change
on this file was baf4cc4, checked in by ppaunovski <paunovskipavel@…>, 3 months ago |
split group project and individual project into two separate folders
|
-
Property mode
set to
100644
|
File size:
414 bytes
|
Line | |
---|
1 | import { Injectable } from '@angular/core';
|
---|
2 | import {Observable} from "rxjs";
|
---|
3 | import {Station} from "../../model/Station";
|
---|
4 | import {HttpClient} from "@angular/common/http";
|
---|
5 |
|
---|
6 | @Injectable({
|
---|
7 | providedIn: 'root'
|
---|
8 | })
|
---|
9 | export class StationService {
|
---|
10 | private url = '/api/stations'
|
---|
11 | constructor(private http: HttpClient) { }
|
---|
12 |
|
---|
13 | getAllStations(): Observable<Station[]> {
|
---|
14 | return this.http.get<Station[]>(this.url);
|
---|
15 | }
|
---|
16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.