File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11< p >
2- flight works!
2+ {{flights}}
33</ p >
Original file line number Diff line number Diff line change 11import { 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} )
89export 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}
Original file line number Diff line number Diff line change @@ -6,4 +6,8 @@ import { Injectable } from '@angular/core';
66export class FlightService {
77
88 constructor ( ) { }
9+
10+ listFlights ( ) {
11+ return '["Flights"]' ;
12+ }
913}
You can’t perform that action at this time.
0 commit comments