Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Injectable } from '@angular/core';
- import { HttpClient, HttpHeaders } from '@angular/common/http';
- import { environment } from '../environments/environment';
- @Injectable({
- providedIn: 'root'
- })
- export class HistorianAPIService {
- headers = new HttpHeaders({
- 'Authorization': `Bearer ${environment.access_token}`,
- });
- private dataUrl = environment.dataUrl;
- private dataSource = `assets/data/WIN-9DBOGP80695.Simulation00052 - OG.json`;
- constructor(private http: HttpClient) { }
- // getHistorianData() {
- // return this.http.get(this.serverUrl, { headers: this.headers });
- // }
- getHistorianData() {
- return this.http.get(this.dataSource);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement