Skip to content
Permalink
727026dfe3
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
28 lines (21 sloc) 602 Bytes
import { Component, OnInit } from '@angular/core';
import { MetricsService } from '../services/metrics.service';
@Component({
selector: 'app-statistics',
templateUrl: './statistics.component.html',
styleUrls: ['./statistics.component.css']
})
export class StatisticsComponent implements OnInit {
constructor(public data: MetricsService) { }
ngOnInit()
{
const jsonToken = localStorage.getItem('auth_token');
try {
this.data.getRecentMetrics(jsonToken).subscribe((data) => {
console.log(data);
});
} catch (err) {
return err;
}
}
}