Angular2 Live reload


Has anyone got themselves up and running with Angular 2 and live reload?

I’m struggling to find a solution for live reloading, and it’s very frustrating reloading the server each time I want a small change!


I have been using c9 with Angular2 constantly for 8 months and have never had a problem with the live reload, certainly with the standard “quickstart” setup using SystemJS that is provided with the Angular docs. Lite-Server (which is really BrowserSync) works perfectly for me from the scripted “start” command defined in the package.json. (The only issue is the standard one with c9 of assuring that you are using the correct ports (like 8080) and not the ones assigned by default by LiteServer/BrowserSync. The answer to this is to create a bs-config.json file with the desired port referenced as an override But you must already be doing this or you wouldn’t be getting a browser display at all, auto-refreshed or otherwise.)


Want to add that I am using the CLI right now (the new webpack version), and this is also giving me no trouble with auto-refresh.

As with the SystemJS/quickstart approach, you need to override the ports for c9. With the CLI this means calling ng serv e as follows:

ng serve --host --port 8080 --live-reload-port 8081