- add bulma style

- add components: messages, locate-button
- move index.html into src folder
- move to angular build tools
- styles.css -> styles.scss
This commit is contained in:
Arno Kaimbacher 2021-09-07 08:36:17 +02:00
parent 220944b115
commit df3561235d
37 changed files with 12724 additions and 645 deletions

View file

@ -1,18 +1,22 @@
import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';
import { Station } from 'shared/models/station';
import { Station } from '../../shared/models/station';
import { MessageService } from './message.service';
import { STATIONS } from './mock-stations';
@Injectable({
providedIn: 'root'
})
export class StationService {
private messageService;
constructor() { }
constructor(messageService: MessageService) {
this.messageService = messageService;
}
getStations(): Observable<Station[]> {
const stations = of(STATIONS);
// this.messageService.add('HeroService: fetched heroes');
this.messageService.add('StationService: fetched stations');
return stations;
}
@ -20,7 +24,7 @@ export class StationService {
// For now, assume that a hero with the specified `id` always exists.
// Error handling will be added in the next step of the tutorial.
const station = STATIONS.find(h => h.id === id)!;
// this.messageService.add(`HeroService: fetched hero id=${id}`);
this.messageService.add(`StationService: fetched station id=${id}`);
return of(station);
}
}