import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { ServerService } from '../../app/services/server.service'; import { RestBase } from '../../app/services/rest-base'; @Component({ selector: 'homepage', templateUrl: './homepage.component.html', styleUrls: ['./homepage.component.css'], providers: [] }) export class HomepageComponent implements OnInit{ private userInfo: any; constructor(private serverService: ServerService, private route: ActivatedRoute, private router: Router, private restbase: RestBase){ } ngOnInit() { this.serverService.whoami().subscribe( userInfo => { this.userInfo = userInfo; }, error => { } ); } getStatistics(){ return this.restbase.get("datasetprofile/getAll"); } }