Advertisement
Shell_Casing

component

Dec 21st, 2018
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Component, OnInit } from '@angular/core';
  2. import { HistorianAPIService } from './historian-api.service';
  3. import { TagsService } from './tags-service.service';
  4.  
  5. @Component({
  6.   selector: 'app-root',
  7.   templateUrl: './app.component.html',
  8.   styleUrls: ['./app.component.css']
  9. })
  10. export class AppComponent implements OnInit {
  11.   title = 'app';
  12.  
  13.  
  14.   constructor(private dataGetter: HistorianAPIService, private tagsGetter: TagsService ) {}
  15.  
  16.   ngOnInit() {
  17.     this.tagsGetter.getAllTags().subscribe(() => console.log('Tags received.'));
  18.  
  19.   }
  20.  
  21.   getData() {
  22.     this.dataGetter.getHistorianData().subscribe(response => {
  23.       console.log(response.Data.Samples);
  24.       // const timeAndValuesArray = response.Data.map(values => values.Samples);
  25.       // console.log(timeAndValuesArray);
  26.  
  27.     });
  28.   }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement