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) { constructor(private openlpService: OpenLPService) {
openlpService.stateChanged$.subscribe(item => this.state = item); openlpService.stateChanged$.subscribe(item => this.state = item);
openlpService.getServiceItems().subscribe(result => {
console.log(result);
});
} }
nextItem() { nextItem() {
this.openlpService.nextItem().subscribe(res => console.log(res)); this.openlpService.nextItem().subscribe();
} }
previousItem() { previousItem() {
this.openlpService.previousItem().subscribe(res => console.log(res)); this.openlpService.previousItem().subscribe();
} }
nextSlide() { nextSlide() {
this.openlpService.nextSlide().subscribe(res => console.log(res)); this.openlpService.nextSlide().subscribe();
} }
previousSlide() { previousSlide() {
this.openlpService.previousSlide().subscribe(res => console.log(res)); this.openlpService.previousSlide().subscribe();
} }
blankDisplay() { blankDisplay() {
this.openlpService.blankDisplay().subscribe(res => console.log(res)); this.openlpService.blankDisplay().subscribe();
} }
themeDisplay() { themeDisplay() {
this.openlpService.themeDisplay().subscribe(res => console.log(res)); this.openlpService.themeDisplay().subscribe();
} }
desktopDisplay() { desktopDisplay() {
this.openlpService.desktopDisplay().subscribe(res => console.log(res)); this.openlpService.desktopDisplay().subscribe();
} }
showDisplay() { 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 { ServiceItem } from './service_item';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { map, take } from 'rxjs/operators'; import { map, take } from 'rxjs/operators';
import { SlideOuterResponse, PluginDescription } from './responses'; import { PluginDescription } from './responses';
let deserialize = (json, cls) => { let deserialize = (json, cls) => {
var inst = new cls(); var inst = new cls();

View File

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