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 'rxjs/Rx'; import { Injectable } from '@angular/core'; import { Toolbox } from '../services/toolbox'; import {RestBase} from './rest-base'; @Injectable() export class RegistryService implements OnInit { constructor(public restBase: RestBase) { } ngOnInit(){ } getRegistryIdsLabels() { return this.restBase.get("registry/listAllLabelIDs"); } getRegistryIds(){ return this.restBase.get("registries"); } getAllRegistries(){ return this.restBase.get("registry/getAll"); } create(registry){ return this.restBase.post("registry/create", registry); } delete(registryID){ var registry = {"id": registryID}; return this.restBase.post("registry/delete", registry); } }