mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-01-15 21:31:56 +00:00
Expose JSON sending method in weboscketservice
This commit is contained in:
parent
438138adc5
commit
b6b647dc21
@ -44,6 +44,10 @@ export class WebSocketService {
|
|||||||
const message = {'key': key};
|
const message = {'key': key};
|
||||||
if (data) { message['data'] = data; }
|
if (data) { message['data'] = data; }
|
||||||
if (trigger) { message['trigger'] = trigger; }
|
if (trigger) { message['trigger'] = trigger; }
|
||||||
this.uplink.next(message);
|
this.sendJSON(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public sendJSON(json: any) {
|
||||||
|
this.uplink.next(json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user