- add dashboard and angular routing files
- npm updates - changes in webpack.common.js
This commit is contained in:
parent
72cc5241af
commit
220944b115
17 changed files with 377 additions and 105 deletions
25
src/app/dashboard/dashboard.component.ts
Normal file
25
src/app/dashboard/dashboard.component.ts
Normal 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);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue