2018-08-19 20:37:53 +00:00
|
|
|
import { Component } from '@angular/core';
|
|
|
|
|
|
|
|
|
2018-08-22 20:04:41 +00:00
|
|
|
import { OpenLPService } from '../../openlp.service';
|
2018-08-19 20:37:53 +00:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'openlp-remote-alert',
|
2018-08-22 20:04:41 +00:00
|
|
|
templateUrl: './alert.component.html',
|
|
|
|
styleUrls: ['./alert.component.scss'],
|
2018-08-19 20:37:53 +00:00
|
|
|
providers: [OpenLPService]
|
|
|
|
})
|
|
|
|
|
|
|
|
export class OpenLPAlertComponent {
|
|
|
|
|
|
|
|
public alert: string;
|
|
|
|
|
|
|
|
constructor(private openlpService: OpenLPService) { }
|
|
|
|
|
|
|
|
onSubmit() {
|
|
|
|
console.log('submitted: ', this.alert);
|
2018-08-20 13:25:28 +00:00
|
|
|
this.openlpService.showAlert(this.alert).subscribe(res => console.log(res));
|
2018-08-19 20:37:53 +00:00
|
|
|
this.alert = '';
|
|
|
|
}
|
|
|
|
}
|