blob: 1660174b540e08da1943bcea42c34efece64ea6f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { Component, OnInit } from '@angular/core';
import { RestAPI } from '../rest-api';
import { ApiService } from '../api.service';
@Component({
selector: 'app-rest-apis',
templateUrl: './rest-apis.component.html'
})
export class RestApisComponent implements OnInit {
apis: RestAPI[];
constructor(private apiService: ApiService) { }
getAPIs(): void {
this.apiService.getAPIs().subscribe(apis => this.apis = apis);
}
ngOnInit() {
this.getAPIs();
}
}
|