Service items are displayed

This commit is contained in:
Simon Hanna 2018-08-20 14:12:30 +02:00
parent cebd15c57c
commit 48750470bd
2 changed files with 1 additions and 16 deletions

View File

@ -192,12 +192,6 @@ export class OpenLPService {
}
/*
search(plugin, text) {
return this.http.get('http://localhost:4316/' + plugin + '/search', buildTextParams(text))
.toPromise()
.then(response => response.json().results.items)
.catch(this.handleError);
}
sendItemLive(plugin, id) {
this.http.get('http://localhost:4316/' + plugin + '/live', buildNumberParams(id))
@ -212,14 +206,5 @@ export class OpenLPService {
.then(response => console.log(response))
.catch(this.dropError);
}
private dropError(error: any) {
console.error('An error occurred', error);
}
private handleError(error: any) {
console.error('An error occurred', error);
return Promise.reject(error.message || error);
}
*/
}

View File

@ -30,7 +30,7 @@ export class OpenLPServiceComponent implements OnInit {
}
getServiceItems() {
// this.openlpService.getServiceItems().then(items => this.items = items);
this.openlpService.getServiceItems().subscribe(items => this.items = items);
}
constructor(private openlpService: OpenLPService, private router: Router) {