5 lines
17 KiB
JSON
Raw Permalink Normal View History

{
"id": "cli/serve",
"title": "ng serve",
"contents": "\n<article>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular-cli/edit/master/packages/angular/cli/commands/serve.json?message=docs(...)%3A%20describe%20your%20change...\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular-cli/tree/v12.0.0-next.7/packages/angular/cli/commands/serve.json\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n \n\n\n<div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io/cli\", \"name\": \"CLI\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/cli/serve\", \"name\": \"serve\" } }\n ]\n }\n </script>\n <a href=\"cli\">CLI</a>\n</div>\n\n \n<header class=\"cli-header\">\n <h1 id=\"ng-serve\">ng serve<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"cli/serve#ng-serve\"><i class=\"material-icons\">link</i></a></h1>\n</header>\n\n\n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"cli-body\">\n \n <p>Builds and serves your app, rebuilding on file changes.</p>\n\n \n<code-example hidecopy=\"true\" class=\"no-box api-heading no-auto-link\">ng <span class=\"cli-name\">serve</span> &#x3C;<var>project</var>> [<var>options</var>]</code-example>\n\n<code-example hidecopy=\"true\" class=\"no-box api-heading no-auto-link\">ng <span class=\"cli-name\">s</span> &#x3C;<var>project</var>> [<var>options</var>]</code-example>\n\n\n\n \n\n \n\n<h2 class=\"no-anchor\" id=\"arguments\">Arguments</h2>\n<table class=\"is-full-width list-table property-table\">\n <thead>\n <tr>\n <th width=\"15%\">Argument</th>\n <th width=\"40%\">Description</th>\n <th>Value Type</th>\n </tr>\n </thead>\n <tbody>\n \n <tr class=\"cli-option\">\n <td><code class=\"cli-option-syntax no-auto-link\">&#x3C;<var>project</var>></code></td>\n <td>\n <p>The name of the project to build. Can be an application or a library.</p>\n\n \n </td>\n <td><code class=\"cli-option-syntax no-auto-link\">string</code></td>\n </tr>\n \n </tbody>\n</table>\n\n\n \n\n<h2 class=\"no-anchor\" id=\"options\">Options</h2>\n<table class=\"is-full-width list-table property-table\">\n <thead>\n <tr>\n <th width=\"15%\">Option</th>\n <th width=\"40%\">Description</th>\n <th>Value Type</th>\n <th>Default Value</th>\n </tr>\n </thead>\n <tbody>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link\">--allowed-hosts</code>\n </td>\n <td>\n \n <p>List of hosts that are allowed to access the dev server.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">array</code></td>\n <td></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link deprecated-api-item\">--aot</code>\n </td>\n <td>\n \n \n <p><strong>Deprecated:</strong> Use the \"aot\" option in the browser builder instead.</p>\n\n \n \n <p>Build using Ahead of Time compilation.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\">boolean</code></td>\n <td></td>\n </tr>\n \n <tr class=\"cli-option\">\n <td>\n <code class=\"cli-option-syntax no-auto-link deprecated-api-item\">--base-href</code>\n </td>\n <td>\n \n \n <p><strong>Deprecated:</strong> Use the \"baseHref\" option in the browser builder instead.</p>\n\n \n \n <p>Base url for the application being built.</p>\n\n \n </td>\n <td><code class=\"no-auto-link\
}