mirror of https://gitlab.com/openlp/web-remote.git
Service + Slide component refactoring
This commit is contained in:
parent
e7fc8ba17d
commit
a85476968e
|
@ -12,9 +12,6 @@ import { ServiceItem } from '../../responses';
|
|||
})
|
||||
|
||||
export class ServiceComponent {
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
onItemSelected(item: ServiceItem) {
|
||||
if (item.is_valid) {
|
||||
this.openlpService.setServiceItem(item.id).subscribe();
|
||||
|
|
|
@ -14,7 +14,7 @@ export class SlideItemComponent {
|
|||
@Output() select = new EventEmitter<Slide>();
|
||||
|
||||
onSlideSelected(slide: Slide) {
|
||||
this.select.emit(slide)
|
||||
this.select.emit(slide);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
|
||||
import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
import { Slide } from '../../../responses';
|
||||
|
@ -10,7 +10,7 @@ import { OpenLPService } from '../../../openlp.service';
|
|||
styleUrls: ['./slide-list.component.scss'],
|
||||
})
|
||||
|
||||
export class SlideListComponent implements OnInit {
|
||||
export class SlideListComponent implements OnInit, OnDestroy {
|
||||
slides: Slide[] = null;
|
||||
@Output() slideSelected = new EventEmitter<SlideListItem>();
|
||||
_subscription: Subscription;
|
||||
|
|
Loading…
Reference in New Issue