serve
ng serve
ng dev
ng s
Builds and serves your application, rebuilding on file changes.
Arguments
project
The name of the project to build. Can be an application or a library.
string
Options
allowed-hosts
The hosts that the development server will respond to. This option sets the Vite option of the same name. For further details: https://vite.dev/config/server-options.html#server-allowedhosts
boolean
build-target
A build builder target to serve in the format of project:target[:configuration]
. You can also pass in more than one configuration name as a comma-separated list. Example: project:target:production,staging
.
string
configuration
c
One or more named builder configurations as a comma-separated list as specified in the "configurations" section in angular.json. The builder uses the named configurations to run the given target. For more information, see https://angular.dev/reference/configs/workspace-config#alternate-build-configurations.
string
headers
Custom HTTP headers to be added to all responses.
array
headers
Custom HTTP headers to be added to all responses.
string
help
Shows a help message for this command in the console.
boolean
hmr
Enable hot module replacement. Defaults to the value of 'liveReload'. Currently, only global and component stylesheets are supported.
boolean
host
Host to listen on.
string
Defaultlocalhost
inspect
Activate debugging inspector. This option only has an effect when 'SSR' or 'SSG' are enabled.
string
live-reload
Whether to reload the page on change, using live-reload.
boolean
Defaulttrue
open
o
Opens the url in default browser.
boolean
Defaultfalse
poll
Enable and define the file watching poll time period in milliseconds.
number
port
Port to listen on.
number
Default4200
prebundle
Enable and control the Vite-based development server's prebundling capabilities. To enable prebundling, the Angular CLI cache must also be enabled.
boolean
Defaulttrue
proxy-config
Proxy configuration file. For more information, see https://angular.dev/tools/cli/serve#proxying-to-a-backend-server.
string
serve-path
The pathname where the application will be served.
string
ssl
Serve using HTTPS.
boolean
Defaultfalse
ssl-cert
SSL certificate to use for serving HTTPS.
string
ssl-key
SSL key to use for serving HTTPS.
string
verbose
Adds more details to output logging.
boolean
watch
Rebuild on change.
boolean
Defaulttrue