web-remote/src/app/components/alert/alert.component.ts

25 lines
536 B
TypeScript
Raw Normal View History

import { Component } from '@angular/core';
2018-08-22 20:04:41 +00:00
import { OpenLPService } from '../../openlp.service';
@Component({
selector: 'openlp-alert',
templateUrl: './alert.component.html',
styleUrls: ['./alert.component.scss'],
providers: [OpenLPService]
})
export class AlertComponent {
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));
this.alert = '';
}
}