This commit is contained in:
Simon Hanna 2018-08-22 21:29:20 +02:00
parent f6822992ef
commit 4973666a13
3 changed files with 10 additions and 13 deletions

View File

@ -14,41 +14,38 @@ export class AppComponent {
constructor(private openlpService: OpenLPService) {
openlpService.stateChanged$.subscribe(item => this.state = item);
openlpService.getServiceItems().subscribe(result => {
console.log(result);
});
}
nextItem() {
this.openlpService.nextItem().subscribe(res => console.log(res));
this.openlpService.nextItem().subscribe();
}
previousItem() {
this.openlpService.previousItem().subscribe(res => console.log(res));
this.openlpService.previousItem().subscribe();
}
nextSlide() {
this.openlpService.nextSlide().subscribe(res => console.log(res));
this.openlpService.nextSlide().subscribe();
}
previousSlide() {
this.openlpService.previousSlide().subscribe(res => console.log(res));
this.openlpService.previousSlide().subscribe();
}
blankDisplay() {
this.openlpService.blankDisplay().subscribe(res => console.log(res));
this.openlpService.blankDisplay().subscribe();
}
themeDisplay() {
this.openlpService.themeDisplay().subscribe(res => console.log(res));
this.openlpService.themeDisplay().subscribe();
}
desktopDisplay() {
this.openlpService.desktopDisplay().subscribe(res => console.log(res));
this.openlpService.desktopDisplay().subscribe();
}
showDisplay() {
this.openlpService.showDisplay().subscribe(res => console.log(res));
this.openlpService.showDisplay().subscribe();
}
}

View File

@ -7,7 +7,7 @@ import { Slide } from './slide';
import { ServiceItem } from './service_item';
import { Observable } from 'rxjs';
import { map, take } from 'rxjs/operators';
import { SlideOuterResponse, PluginDescription } from './responses';
import { PluginDescription } from './responses';
let deserialize = (json, cls) => {
var inst = new cls();

View File

@ -19,7 +19,7 @@ providers: [OpenLPService]
})
export class OpenLPServiceComponent implements OnInit {
items = null;
items = [];
ngOnInit() {
this.getServiceItems();
}