source: trip-planner-front/node_modules/primeng/esm2020/terminal/terminalservice.mjs@ 571e0df

Last change on this file since 571e0df was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 2.9 KB
RevLine 
[59329aa]1import { Injectable } from '@angular/core';
2import { Subject } from 'rxjs';
3import * as i0 from "@angular/core";
4export class TerminalService {
5 constructor() {
6 this.commandSource = new Subject();
7 this.responseSource = new Subject();
8 this.commandHandler = this.commandSource.asObservable();
9 this.responseHandler = this.responseSource.asObservable();
10 }
11 sendCommand(command) {
12 if (command) {
13 this.commandSource.next(command);
14 }
15 }
16 sendResponse(response) {
17 if (response) {
18 this.responseSource.next(response);
19 }
20 }
21}
22TerminalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TerminalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
23TerminalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TerminalService });
24i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TerminalService, decorators: [{
25 type: Injectable
26 }] });
27//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVybWluYWxzZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC9jb21wb25lbnRzL3Rlcm1pbmFsL3Rlcm1pbmFsc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxNQUFNLENBQUM7O0FBRy9CLE1BQU0sT0FBTyxlQUFlO0lBRDVCO1FBR1ksa0JBQWEsR0FBRyxJQUFJLE9BQU8sRUFBVSxDQUFDO1FBQ3RDL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iBzdHJpbmcpIHtcbiAgICAgICAgaWYgKGNvbW1hbmQpIHtcbiAgICAgICAgICAgIHRoaXMuY29tbWFuZFNvdXJjZS5uZXh0KGNvbW1hbmQpO1xuICAgICAgICB9XG4gICAgfVxuICAgIFxuICAgIHNlbmRSZXNwb25zZShyZXNwb25zZTogc3RyaW5nKSB7XG4gICAgICAgIGlmIChyZXNwb25zZSkge1xuICAgICAgICAgICAgdGhpcy5yZXNwb25zZVNvdXJjZS5uZXh0KHJlc3BvbnNlKTtcbiAgICAgICAgfVxuICAgIH1cbn0iXX0=
Note: See TracBrowser for help on using the repository browser.