Last change
on this file since baf4cc4 was baf4cc4, checked in by ppaunovski <paunovskipavel@…>, 4 weeks ago |
split group project and individual project into two separate folders
|
-
Property mode
set to
100644
|
File size:
414 bytes
|
Rev | Line | |
---|
[baf4cc4] | 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.