Skip to content

Commit 16bbff2

Browse files
committed
Dummy service created
1 parent 40aba53 commit 16bbff2

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<p>
2-
flight works!
2+
{{flights}}
33
</p>

src/app/flight/flight.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
import { Component, OnInit } from '@angular/core';
2+
import {FlightService} from './flight.service';
23

34
@Component({
45
selector: 'app-flight',
56
templateUrl: './flight.component.html',
67
styleUrls: ['./flight.component.scss']
78
})
89
export class FlightComponent implements OnInit {
10+
flights: any;
911

10-
constructor() { }
12+
constructor(private flightService: FlightService) { }
1113

1214
ngOnInit() {
15+
this.flights = this.flightService.listFlights();
1316
}
1417

1518
}

src/app/flight/flight.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ import { Injectable } from '@angular/core';
66
export class FlightService {
77

88
constructor() { }
9+
10+
listFlights() {
11+
return '["Flights"]';
12+
}
913
}

0 commit comments

Comments
 (0)