method-list.component.ts 610 Bytes
Newer Older
Vitali Stupin's avatar
Initial    
Vitali Stupin committed
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 { Subsystem } from '../subsystem';
import { MethodsService } from '../methods.service';

@Component({
  selector: 'app-method-list',
  templateUrl: './method-list.component.html',
  styleUrls: ['./method-list.component.css']
})
export class MethodListComponent implements OnInit {
  subsystems: Subsystem[];

  constructor(private methodsService: MethodsService) { }

  ngOnInit() {
    this.getMethods();
  }

  getMethods(): void {
    this.methodsService.getMethods()
      .subscribe(subsystems => this.subsystems = subsystems.slice(0, 50));
  }
}