- add dashboard and angular routing files

- npm updates
- changes in webpack.common.js
This commit is contained in:
Arno Kaimbacher 2021-08-27 16:11:29 +02:00
parent 72cc5241af
commit 220944b115
17 changed files with 377 additions and 105 deletions

View file

@ -0,0 +1,25 @@
import { Component, OnInit } from '@angular/core';
import { StationService } from '../services/station.service';
import { Station } from '../../shared/models/station';
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent implements OnInit {
public stations: Station[] = [];
constructor(private stationService: StationService) { }
ngOnInit() {
this.getStations();
}
getStations(): void {
this.stationService.getStations()
.subscribe(stations => this.stations = stations);
}
}