livereload fail while not running on localhost
leoyuholo opened this issue · comments
Leo Yu Ho Lo commented
Hi, thanks for this great work. It helps a lot for learning angular 2. I cloned this repository and try to run gulp serve
, everything goes well except livereload. I figured out the reason, it is because I am running it inside vm, and view it with browser running on the host machine. It makes the http://localhost:35729/livereload.js
assumption to fail.
I try to change localhost
to window.location.hostname
, and it works. May I submit a pull request, in case someone like me running it outside localhost may encounter the same problem?
Gábor Soós commented
thanks, merged it, works fine