summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/home/home.component.ts
blob: 1adaf0ebf178df48413b3489f67a268f07da4cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { Component, OnInit } from '@angular/core';
import { SdcService } from '../services/sdc.service';
import { DataService } from '../services/data.service';

@Component({
  selector: 'my-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.scss'],
  providers: [SdcService, DataService]
})
export class HomeComponent implements OnInit {

  constructor(private _sdcService: SdcService) {
    // Do stuff
  }

  ngOnInit() {
    console.log('Hello Home');
    console.log('getServicesModels: ');
    this._sdcService.getServicesModels().subscribe(
      // onNext() function
      value => console.log('value is ', value),
      // onError() function
      error => console.log('error is ', error),
      // onComplete() function
      () => console.log('completed')
    );
  }

}