When serving my app with the Angular cli, how do I disable auto-reload?
ng --help
mentions the --live-reload
option, but I can't make it work.
ng serve --live-reload=false
or ng serve --live-reload false
do not work
EDIT : it seems to be a bug https://github.com/angular/angular-cli/issues/1755
Just do ng serve --live-reload false
or ng serve --no-live-reload
It used to not work, this PR solved it.
serve your application with this command:
ng serve --live-reload=false
if you want to run your application in prod mode, use following command
ng serve --source-map=false --aot --prod --live-reload=false
I think you only want to disable the rebuild on change option
Just try:
$ ng serve --watch=true|false
--watch
is one thing, --live-reload
is another. I don't think your answer really address the OP.
The solution for this is to upgrade the version of the CLI you are using. The CLI now uses in memory for the build process and is no longer writing to disk. This helps with the antivirus/disk write issue.
--live-reload
work with the cli
ng serve
via cloudflare (they have a new tunnel called argo tunnel that allows me to reverse proxy from my dev machine). I want to test on proper https, on a CDN without a proper build. Also sometimes I may be editing realtime with others previewing the site in a meeting and I don't want it reloading until I tell them to hit reload.
Success story sharing
ng serve --live-reload=false
--aot --prod
. haven't tried other settings, but this isn't working.--prod
mode on, though?