aboutsummaryrefslogtreecommitdiff
path: root/src/app/rest-apis/rest-apis.component.ts
blob: f9cd3cf066f3bc77f096775b83438517e3306d8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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();
  }

}