import { Component, Input, OnInit, AfterViewChecked, ViewChild } from '@angular/core'; import { HttpClient , HttpHeaders, HttpParams} from '@angular/common/http'; import { TokenService, TokenProvider } from './login/token.service' import { Toolbox } from '../services/toolbox'; import 'rxjs/Rx'; import { Injectable } from '@angular/core'; import {RestBase} from './rest-base'; @Injectable() export class ProjectService implements OnInit { constructor(private restBase: RestBase) { } ngOnInit(){ } getProjectIdsLabels() { return this.restBase.get("project/listAllLabelIDs"); } getProjectIds(){ return this.restBase.get("projects"); } getAllProjects(){ return this.restBase.get("project/getAll"); } create(project){ return this.restBase.post("project/create", project); } delete(projectID){ var project = {"id": projectID}; return this.restBase.post("project/delete", project); } }