import { Component , OnInit } from '@angular/core' ; import { StatusService } from '../../services/status.service' ; import { CmdbStatus } from '../../models/cmdb-status' ; @ Component ( { selector : 'cmdb-status-list' , templateUrl : './status-list.component.html' , styleUrls : [ './status-list.component.scss' ] } ) export class StatusListComponent implements OnInit { public statusList : CmdbStatus [ ] ; constructor ( private statusService ) { } public ngOnInit ( ) { this . statusService . getStatusList ( ) . subscribe ( ( respList ) => { this . statusList = respList ; } ) ; } }