Solution on Error [WDS] Disconnected! angular

Solution on Error [WDS] Disconnected! angular
By ng serve —disable-host-check worked for me…


client?bf7e:146 [WDS] Disconnected!
close @ client?bf7e:146
sock.onclose @ socket.js:15
webpackJsonp.../../../../sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent @ eventtarget.js:51
(anonymous) @ main.js:356
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:425
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask @ zone.js:192
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:499
ZoneTask.invoke @ zone.js:488
timer @ zone.js:2040
setTimeout (async)
scheduleTask @ zone.js:2056
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:411
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:236
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleMacroTask @ zone.js:259
----

Solution
1- Configure Nginx….

on Ubuntu, add the next code on default.conf
/etc/nginx/conf.g/default.conf


 location /sockjs-node/ {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        rewrite ^/(.*)$  /$1  break;
        proxy_set_header Host localhost;
        proxy_pass http://localhost:1355/;
    }

2- And to server ng add the option –public-host=httpfake://0.0.0.0/

sudo forever start node_modules/@angular/cli/bin/ng serve -w –port 1355 –live-reload 1356 –aot –env=prod –public-host=httpfake://0.0.0.0/