Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, OnInit } from '@angular/core';
- import { HistorianAPIService } from './historian-api.service';
- import { TagsService } from './tags-service.service';
- @Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.css']
- })
- export class AppComponent implements OnInit {
- title = 'app';
- constructor(private dataGetter: HistorianAPIService, private tagsGetter: TagsService ) {}
- ngOnInit() {
- this.tagsGetter.getAllTags().subscribe(() => console.log('Tags received.'));
- }
- getData() {
- this.dataGetter.getHistorianData().subscribe(historianData => {
- console.log(historianData.Data[0].Samples);
- // const timeAndValuesArray = response.Data.map(values => values.Samples);
- // console.log(timeAndValuesArray);
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement