From f31e1a6330ee398674dde617a379241e900e8472 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 28 Apr 2019 23:30:44 +0200 Subject: [PATCH] fixing the websocket http led client example --- clients/controller-html/htmlstrip.html | 164 +++++++++++++------------ 1 file changed, 84 insertions(+), 80 deletions(-) diff --git a/clients/controller-html/htmlstrip.html b/clients/controller-html/htmlstrip.html index cb3484f..aed0bad 100644 --- a/clients/controller-html/htmlstrip.html +++ b/clients/controller-html/htmlstrip.html @@ -1,85 +1,89 @@ - - - - - {{data}} -
-
- {{value}} -
+ + + + + + + {{data}} +
+
+ {{value}}
- - - + + - - + }); + + socket.onmessage(function (event) { + $scope.$apply(function () { + console.log(event.data) + json = JSON.parse(event.data) + $scope.data = json + }); + }); + }]); + + + + \ No newline at end of file