中文翻譯
ng help
ng build <options ...>
構(gòu)建您的應(yīng)用程序并將其放入輸出路徑(dist /默認(rèn)情況下)勒虾。
別名:b
--target(String)(默認(rèn)值:開發(fā))定義構(gòu)建目標(biāo)纺阔。
別名:-t <value>,-dev(--target = development)修然,-prod(--target = production)笛钝,--
target
<value>
--environment(String)定義構(gòu)建環(huán)境。
別名:-e <value>愕宋,--environment <value>
--output-path(Path)要放置輸出的路徑婆翔。
別名:-op <value>,--
outputPath
<value>
--aot(Boolean)構(gòu)建使用時間編譯掏婶。
別名:-aot
--sourcemaps(Boolean)輸出源地圖啃奴。
別名:-sm,--sourcemap雄妥,--sourcemaps
--vendor-chunk(Boolean)使用僅包含供應(yīng)商庫的單獨(dú)的包最蕾。
別名:-vc,--vendorChunk
--common-chunk(Boolean)(默認(rèn)值:true)使用單獨(dú)的包含多個捆綁包中使用的代碼老厌。
別名:-cc瘟则,--commonChunk
--base-href(String)正在構(gòu)建的應(yīng)用程序的基本URL。
別名:-bh <value>枝秤,--baseHref <value> --deploy
-url(String)將部署文件的URL醋拧。
別名:-d <value>,--deployUrl <value>
--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。
別名:-v丹壕,--
verbose --progress(Boolean)(默認(rèn)值:true)在建立時將進(jìn)度記錄到控制臺庆械。
別名:-pr,--progress
--i18n-file(String)用于i18n的本地化文件菌赖。
別名:--i18nFile <value>
--i18n-format(String)使用-i18n-file指定的本地化文件的格式缭乘。
別名:--i18nFormat <value>
--locale(String)要用于i18n的區(qū)域設(shè)置。
別名:--locale <value> --extract
-css(Boolean)將css從全局樣式提取到css文件而不是js一個琉用。
別名:-ec堕绩,--
extractCss --watch(Boolean)(默認(rèn)值:false)文件更改時運(yùn)行構(gòu)建。
別名:-w邑时,--watch
--output-hashing = none | all | media | bundles(String)定義輸出文件名cache-busting散列模式奴紧。
別名:-oh <value>,--outputHashing <value>
--poll(Number)啟用并定義查看輪詢時間段(毫秒)的文件晶丘。
別名:-poll <value>
--app(String)指定要使用的應(yīng)用程序名稱或索引绰寞。
別名:-a <value>,-app <value>
--delete-output-path(Boolean)(默認(rèn)值:true)刪除生成前的輸出路徑铣口。
別名:-dop滤钱,
--
deleteOutputPath
--preserve-symlinks(Boolean)(默認(rèn)值:false)解析模塊時請勿使用實(shí)際路徑。
別名:--preserveSymlinks
--extract-licenses(Boolean)(默認(rèn)值:true)在單獨(dú)的文件中提取所有許可證脑题,僅在生產(chǎn)構(gòu)建的情況下件缸。
別名:--extractLicenses
--show-circular-dependencies(Boolean)(默認(rèn)值:true)在構(gòu)建上顯示循環(huán)依賴性警告。
別名:-scd叔遂,--showCircularDependencies
--build-optimizer(Boolean)(默認(rèn)值:false)(實(shí)驗(yàn))使用時他炊,啟用@ angular-devkit / build-optimizer優(yōu)化
--aot
。
別名:--buildOptimizer
--named-chunks(Boolean)為延遲加載的塊使用文件名已艰。
別名:-NC痊末,--namedChunks
--stats-JSON(布爾值)(默認(rèn)值:false)生成一個
stats.json
其可以使用工具,如被分析的文件:
webpack-bundle-analyzer
或
[https://webpack.github.io/analyse
](https://webpack.github.io/analyse)哩掺。
別名:--statsJson
ng完成<options ...>
將自動完成功能添加到
ng
命令和子命令凿叠。
--all(Boolean)(默認(rèn)值:true)生成與bash和zsh兼容的完成腳本。
別名:-a嚼吞,-all
--bash(Boolean)(默認(rèn)值:false)為bash生成完成腳本盒件。
別名:-b,-bash
--zsh(Boolean)(默認(rèn)值:false)為zsh生成完成腳本舱禽。
別名:-z炒刁,-zsh
ng doc <keyword> <options ...>
打開給定關(guān)鍵字的Angular API文檔。
--search(Boolean)(默認(rèn)值:false)搜索整個angular.io而不僅僅是api誊稚。
別名:-s翔始,--search
ng e2e <options ...>
在現(xiàn)有項(xiàng)目中運(yùn)行e2e測試罗心。
別名:e
--target(String)(默認(rèn)值:開發(fā))定義構(gòu)建目標(biāo)。
別名:-t <value>城瞎,-dev(--target = development)渤闷,-prod(--target = production),--
target
<value>
--environment(String)定義構(gòu)建環(huán)境全谤。
別名:-e <value>,--environment <value>
--output-path(Path)要放置輸出的路徑爷贫。
別名:-op <value>认然,--
outputPath
<value>
--aot(Boolean)構(gòu)建使用時間編譯。
別名:-aot
--sourcemaps(Boolean)輸出源地圖漫萄。
別名:-sm卷员,--
sourcemap,--sourcemaps --vendor-chunk(Boolean)使用僅包含供應(yīng)商庫的單獨(dú)包腾务。
別名:-vc毕骡,--vendorChunk
--common-chunk(Boolean)(默認(rèn)值:true)使用單獨(dú)的包含多個捆綁包中使用的代碼。
別名:-cc岩瘦,--commonChunk
--base-href(String)正在構(gòu)建的應(yīng)用程序的基本URL未巫。
別名:-bh <value>,--baseHref <value> --deploy
-url(String)將部署文件的URL启昧。
別名:-d <value>叙凡,--deployUrl <value>
--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。
別名:-v密末,--
verbose --progress(Boolean)(默認(rèn)值:true)在建立時將進(jìn)度記錄到控制臺握爷。
別名:-pr,--progress
--i18n-file(String)用于i18n的本地化文件严里。
別名:--i18nFile <value>
--i18n-format(String)使用--i18n-file指定的本地化文件的格式新啼。
別名:--i18nFormat <value>
--locale(String)要用于i18n的區(qū)域設(shè)置。
別名:--locale <value> --extract
-css(Boolean)將css從全局樣式提取到css文件而不是js一個刹碾。
別名:-ec燥撞,--
extractCss --watch(Boolean)(默認(rèn)值:false)文件更改時運(yùn)行構(gòu)建。
別名:-w迷帜,--watch
--output-hashing = none | all | media | bundles(String)定義輸出文件名cache-busting散列模式叨吮。
別名:-oh <value>,--
outputHashing
<value>
--poll(Number)啟用并定義查看輪詢時間段(毫秒)的文件瞬矩。
別名:-poll <value>
--app(String)指定要使用的應(yīng)用程序名稱或索引茶鉴。
別名:-a <value>,-app <value>
--delete-output-path(Boolean)(默認(rèn)值:true)刪除生成前的輸出路徑景用。
別名:-dop涵叮,
--
deleteOutputPath
--preserve-symlinks(Boolean)(默認(rèn)值:false)解析模塊時請勿使用實(shí)際路徑惭蹂。
別名:--preserveSymlinks
--extract-licenses(Boolean)(默認(rèn)值:true)在單獨(dú)的文件中提取所有許可證,僅在生產(chǎn)構(gòu)建的情況下割粮。
別名:--extractLicenses
--show-circular-dependencies(Boolean)(默認(rèn)值:true)在構(gòu)建上顯示循環(huán)依賴性警告盾碗。
別名:-scd,--showCircularDependencies
--build-optimizer(Boolean)(默認(rèn)值:false)(實(shí)驗(yàn))使用時舀瓢,啟用@ angular-devkit / build-optimizer優(yōu)化
--aot
廷雅。
別名:--buildOptimizer
--named-chunks(Boolean)為延遲加載的塊使用文件名。
別名:-nc京髓,--namedChunks
--port(Number)(默認(rèn)值:0)用于提供應(yīng)用程序的端口航缀。
別名:-p <value>,-port <value>
--host(String)(默認(rèn)值:localhost)默認(rèn)情況下僅偵聽localhost堰怨。
別名:-H <value>芥玉,-
host
<value>
--proxy-config(路徑)代理配置文件。
別名:-pc <value>备图,--proxyConfig <value>
--ssl(Boolean)(默認(rèn)值:false)使用HTTPS進(jìn)行服務(wù)灿巧。
別名:-ssl
--ssl-key(String)(默認(rèn)值:ssl / server.key)用于提供HTTPS的SSL密鑰。
別名:--sslKey <value>
--ssl-cert(String)(默認(rèn)值:ssl / server.crt)用于提供HTTPS的SSL證書揽涮。
別名:--sslCert <value>
--open(Boolean)(默認(rèn)值:false)在默認(rèn)瀏覽器中打開url抠藕。
別名:-o针史,
-open --live-reload(Boolean)(默認(rèn)值:true)是否使用live-reload重新加載頁面调限。
別名:-lr澈魄,--liveReload
--public-host(String)指定瀏覽器客戶端將使用的URL汽烦。
別名:--live-reload-client <value>称勋,--publicHost <value>
--disable-host-check(Boolean)(默認(rèn)值:false)不驗(yàn)證連接的客戶端是允許的主機(jī)的一部分才避。
別名:--disableHostCheck
--hmr(Boolean)(默認(rèn)值:false)啟用熱模塊更換春哨。
別名:-hmr
--config(String)使用特定的配置文件腰吟。
默認(rèn)為angular-cli.json中的量角器配置文件汰聋。
別名:-c <value>门粪,--
config
<value>
--specs(Array)(默認(rèn)
值
:)覆蓋量角器配置中的specs。
可以通過重復(fù)標(biāo)志(ng e2e --specs = spec1.ts --specs = spec2.ts)發(fā)送多個規(guī)格烹困。
別名:-sp <value>玄妈,--specs <value>
--element-explorer(Boolean)(默認(rèn)值:false)啟動Protector的Element Explorer進(jìn)行調(diào)試。
別名:-ee髓梅,--elementExplorer
--webdriver-update(Boolean)(默認(rèn)值:true)嘗試更新webdriver拟蜻。
別名:-wu,--webdriverUpdate
--serve(Boolean)(默認(rèn)值:true)編譯并提供服務(wù)枯饿。
所有非重新加載相關(guān)的服務(wù)選項(xiàng)也可用(例如--port = 4400)酝锅。
別名:-s,--serve
ng彈出<選項(xiàng)...>
彈出您的應(yīng)用程序并輸出正確的Webpack配置和腳本奢方。
--target(String)(默認(rèn):開發(fā))定義構(gòu)建目標(biāo)搔扁。
別名:-t <value>爸舒,-dev(--target = development),-prod(--target = production)稿蹲,--
target
<value>
--environment(String)定義構(gòu)建環(huán)境扭勉。
別名:-e <value>,--environment <value>
--output-path(Path)要放置輸出的路徑苛聘。
別名:-op <value>涂炎,--
outputPath
<value>
--aot(Boolean)構(gòu)建使用時間編譯。
別名:-aot
--sourcemaps(Boolean)輸出源地圖设哗。
別名:-sm唱捣,--sourcemap,
別名:-vc熬拒,--vendorChunk
--common-chunk(Boolean)(默認(rèn)值:true)使用單獨(dú)的包含多個捆綁包中使用的代碼爷光。
別名:-cc垫竞,--commonChunk
--base-href(String)正在構(gòu)建的應(yīng)用程序的基本URL澎粟。
別名:-bh <value>,--baseHref <value> --deploy
-url(String)將部署文件的URL欢瞪。
別名:-d <value>活烙,--deployUrl <value>
--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。
別名:-v遣鼓,--
verbose --progress(Boolean)(默認(rèn)值:true)在建立時將進(jìn)度記錄到控制臺啸盏。
別名:-pr,--progress
--i18n-file(String)用于i18n的本地化文件骑祟。
別名:--i18nFile <value>
--i18n-format(String)使用--i18n-file指定的本地化文件的格式回懦。
別名:--i18nFormat <value>
--locale(String)要用于i18n的區(qū)域設(shè)置。
別名:--locale <value> --extract
-css(Boolean)將css從全局樣式提取到css文件而不是js一個次企。
別名:-ec怯晕,--
extractCss --watch(Boolean)(默認(rèn)值:false)文件更改時運(yùn)行構(gòu)建。
別名:-w缸棵,--watch
--output-hashing = none | all | media | bundles(String)定義輸出文件名cache-busting散列模式舟茶。
別名:-oh <value>,--
outputHashing
<value>
--poll(Number)啟用并定義查看輪詢時間段(毫秒)的文件堵第。
別名:-poll <value>
--delete-output-path(Boolean)(默認(rèn)值:true)在構(gòu)建之前刪除輸出路徑吧凉。
別名:-dop,
--
deleteOutputPath
--preserve-symlinks(Boolean)(默認(rèn)值:false)解析模塊時請勿使用實(shí)際路徑踏志。
別名:--preserveSymlinks
--extract-licenses(Boolean)(默認(rèn)值:true)在單獨(dú)的文件中提取所有許可證阀捅,僅在生產(chǎn)構(gòu)建的情況下。
別名:--extractLicenses
--show-circular-dependencies(Boolean)(默認(rèn)值:true)在構(gòu)建上顯示循環(huán)依賴性警告针余。
別名:-scd也搓,--showCircularDependencies
--build-optimizer(Boolean)(默認(rèn)值:false)(實(shí)驗(yàn))使用時赏廓,啟用@ angular-devkit / build-optimizer優(yōu)化
--aot
。
別名:--buildOptimizer
--named-chunks(Boolean)為延遲加載的塊使用文件名傍妒。
別名:-nc幔摸,--namedChunks
--force(Boolean)覆蓋任何已存在的webpack.config.js和npm腳本。
別名:--
force --app(String)指定要使用的應(yīng)用程序名稱颤练。
別名:-a <value>既忆,-app <value>
ng生成<藍(lán)圖> <選項(xiàng)...>
根據(jù)藍(lán)圖生成和/或修改文件。
別名:g
--dry-run(Boolean)(默認(rèn)值:false)在不進(jìn)行任何更改的情況下運(yùn)行嗦玖。
別名:-d患雇,--dryRun
--lint-fix(Boolean)使用lint在生成后修復(fù)文件。
別名:-lf宇挫,--lintFix
--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息苛吱。
別名:-v,--verbose
ng get <options ...>
從配置獲取值器瘪。
示例:ng get [key]
--global(Boolean)(默認(rèn)值:false)獲取全局配置中的值(在您的主目錄中)翠储。
別名: - 全球
ng help <command-name(默認(rèn)值:all)>
顯示CLI的幫助。
ng lint <options ...>
現(xiàn)有項(xiàng)目中的Lints代碼橡疼。
別名:l
--fix(Boolean)(默認(rèn)值:false)修復(fù)linting錯誤(可能覆蓋linted文件)援所。
別名:-fix
--type-check(Boolean)(默認(rèn)值:false)控制linting的類型檢查。
別名:--typeCheck
--force(Boolean)(默認(rèn)值:false)即使存在linting錯誤也會成功欣除。
別名:--force
--format(String)(默認(rèn):散文)輸出格式(散文住拭,json,時尚历帚,詳細(xì)滔岳,pmd,msbuild挽牢,checkstyle谱煤,vso,文件列表)卓研。
別名:-t <value>趴俘,--format <value>
ng new <options ...>
創(chuàng)建一個新的目錄和一個新的Angular應(yīng)用程序,例如奏赘。
“ng new [name]”寥闪。
別名:n
--dry-run(Boolean)(默認(rèn)值:false)運(yùn)行而不進(jìn)行任何更改。
將列出運(yùn)行“ng new”時所創(chuàng)建的所有文件磨淌。
別名:-d疲憋,--dryRun
--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。
別名:-v梁只,--verbose
--skip-install(Boolean)(默認(rèn)值:false)跳過安裝軟件包缚柳。
別名:-si埃脏,--skipInstall
--skip-git(Boolean)(默認(rèn)值:false)跳過初始化git存儲庫。
別名:-sg秋忙,--skipGit
--skip-tests(Boolean)(默認(rèn)值:false)跳過創(chuàng)建規(guī)范文件彩掐。
別名:-st,--skipTests
--skip-commit(Boolean)(默認(rèn)值:false)跳過提交第一個提交到git灰追。
別名:-sc堵幽,--skipCommit
--directory(String)用于創(chuàng)建應(yīng)用程序的目錄名
。aliases
:-dir <value>弹澎,--directory <value>
--source-dir(String)(默認(rèn)值:src)源目錄的名稱朴下。
您可以稍后更改“.angular-cli.json”(apps [0] .root)中的值。
別名:-sd <value>苦蒿,--
sourceDir
<value>
--style(String)(默認(rèn)值:css)樣式文件默認(rèn)擴(kuò)展名殴胧。
可能的值:css,scss佩迟,less团滥,sass,styl(stylus)音五。
您可以稍后更改“.angular-cli.json”(defaults.styleExt)中的值惫撰。
別名:--style <value>
--prefix(String)(默認(rèn)值:app)用于所有組件選擇器的前綴羔沙。
您可以稍后更改“.angular-cli.json”(apps [0] .prefix)中的值躺涝。
別名:-p <value>,--prefix <value>
--routing(Boolean)(默認(rèn)值:false)生成路由模塊扼雏。
別名:--routing
--inline-style(Boolean)(默認(rèn)值:false)應(yīng)該有一個內(nèi)聯(lián)樣式坚嗜。
別名:-is,--inlineStyle
--inline-template(Boolean)(默認(rèn)值:false)應(yīng)該有一個內(nèi)聯(lián)模板诗充。
別名:
-it
苍蔬,--
inlineTemplate --minimal(Boolean)(默認(rèn)值:false)應(yīng)該創(chuàng)建一個最小的應(yīng)用程序。
別名: - 最小
ng服務(wù)<選項(xiàng)...>
構(gòu)建并提供應(yīng)用程序蝴蜓,重建文件更改碟绑。
別名:server,s
--target(String)(默認(rèn)值:development)定義構(gòu)建目標(biāo)茎匠。
別名:-t <value>格仲,-dev(--target = development),-prod(--target = production)诵冒,--
target
<value>
--environment(String)定義構(gòu)建環(huán)境凯肋。
別名:-e <value>,--environment <value>
--output-path(Path)要放置輸出的路徑汽馋。
別名:-op <value>侮东,--
outputPath
<value>
--aot(Boolean)構(gòu)建使用時間編譯圈盔。
別名:-aot
--sourcemaps(Boolean)輸出源地圖。
別名:-sm悄雅,--sourcemap驱敲,--sourcemaps
--vendor-chunk(Boolean)使用僅包含供應(yīng)商庫的單獨(dú)的包。
別名:-vc宽闲,--vendorChunk
--common-chunk(Boolean)(默認(rèn)值:true)使用單獨(dú)的包含多個捆綁包中使用的代碼癌佩。
別名:-cc,--commonChunk
--base-href(String)正在構(gòu)建的應(yīng)用程序的基本URL便锨。
別名:-bh <value>围辙,--baseHref <value> --deploy
-url(String)將部署文件的URL。
別名:-d <value>放案,--deployUrl <value>
--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息姚建。
別名:-v,--
verbose --progress(Boolean)(默認(rèn)值:true)在建立時將進(jìn)度記錄到控制臺吱殉。
別名:-pr掸冤,--progress
--i18n-file(String)用于i18n的本地化文件。
別名:--i18nFile <value>
--i18n-format(String)使用-i18n-file指定的本地化文件的格式友雳。
別名:--i18nFormat <value>
--locale(String)要用于i18n的區(qū)域設(shè)置稿湿。
別名:--locale <value> --extract
-css(Boolean)將css從全局樣式提取到css文件而不是js一個。
別名:-ec押赊,--
extractCss --watch(Boolean)(默認(rèn)值:true)在更改時重建饺藤。
別名:-w,--watch
--output-hashing = none | all | media | bundles(String)定義輸出文件名cache-busting散列模式流礁。
別名:-oh <value>涕俗,--outputHashing <value>
別名:-poll <value>
--app(String)指定要使用的應(yīng)用程序名稱或索引。
別名:-a <value>神帅,-app <value>
--delete-output-path(Boolean)(默認(rèn)值:true)刪除生成前的輸出路徑再姑。
別名:-dop,
--
deleteOutputPath
--preserve-symlinks(Boolean)(默認(rèn)值:false)解析模塊時請勿使用實(shí)際路徑找御。
別名:--preserveSymlinks
--extract-licenses(Boolean)(默認(rèn)值:true)在單獨(dú)的文件中提取所有許可證元镀,僅在生產(chǎn)構(gòu)建的情況下。
別名:--extractLicenses
--show-circular-dependencies(Boolean)(默認(rèn)值:true)在構(gòu)建上顯示循環(huán)依賴性警告霎桅。
別名:-scd栖疑,--showCircularDependencies
--build-optimizer(Boolean)(默認(rèn)值:false)(實(shí)驗(yàn))使用時,啟用@ angular-devkit / build-optimizer優(yōu)化
--aot
哆档。
別名:--buildOptimizer
--named-chunks(Boolean)為延遲加載的塊使用文件名蔽挠。
別名:-nc,--namedChunks
--port(Number)(默認(rèn)值:4200)要監(jiān)聽的端口。
別名:-p <value>澳淑,-port <value>
--host(String)(默認(rèn)值:localhost)默認(rèn)情況下僅偵聽localhost比原。
別名:-H <value>,-
host
<value>
--proxy-config(路徑)代理配置文件杠巡。
別名:-pc <value>量窘,--proxyConfig <value>
--ssl(Boolean)(默認(rèn)值:false)使用HTTPS進(jìn)行服務(wù)。
別名:-ssl
--ssl-key(String)(默認(rèn)值:ssl / server.key)用于提供HTTPS的SSL密鑰氢拥。
別名:--sslKey <value>
--ssl-cert(String)(默認(rèn)值:ssl / server.crt)用于提供HTTPS的SSL證書蚌铜。
別名:--sslCert <value>
--open(Boolean)(默認(rèn)值:false)在默認(rèn)瀏覽器中打開url。
別名:-o嫩海,
-open --live-reload(Boolean)(默認(rèn)值:true)是否使用live-reload重新加載頁面冬殃。
別名:-lr,--liveReload
--public-host(String)指定瀏覽器客戶端將使用的URL叁怪。
別名:--live-reload-client <value>审葬,--publicHost <value>
--disable-host-check(Boolean)(默認(rèn)值:false)不驗(yàn)證連接的客戶端是允許的主機(jī)的一部分。
別名:--disableHostCheck
--hmr(Boolean)(默認(rèn)值:false)啟用熱模塊更換奕谭。
別名:-hmr
ng set <options ...>
在配置中設(shè)置一個值涣觉。
--global(Boolean)(默認(rèn)值:false)設(shè)置全局配置中的值,而不是在項(xiàng)目中血柳。
別名:-g官册,--global
ng測試<選項(xiàng)...>
在現(xiàn)有項(xiàng)目中運(yùn)行單元測試。
別名:t
--watch(Boolean)文件更改時運(yùn)行構(gòu)建难捌。
別名:-w膝宁,--watch
--code-coverage(Boolean)(默認(rèn)值:false)覆蓋率報告將在coverage /目錄中。
別名:-cc栖榨,--codeCoverage
--config(String)使用特定的配置文件昆汹。
默認(rèn)為.mat-cli.json中的karma配置文件明刷。
別名:-c <value>婴栽,--config <value>
--single-run(Boolean)單次運(yùn)行測試。
別名:-sr辈末,--
singleRun --progress(Boolean)(默認(rèn)值:true)在進(jìn)程中將進(jìn)度記錄到控制臺愚争。
別名:--progress
--browsers(String)覆蓋運(yùn)行哪些瀏覽器測試。
別名:--browsers <value>
--colors(Boolean)啟用或禁用輸出(記者和日志)中的顏色挤聘。
別名:--colors
--log-level(String)記錄級別轰枝。
別名:--logLevel <value>
--port(Number)Web服務(wù)器將偵聽的端口。
別名:-port <value>
--reporters(String)要使用的記者名單组去。
別名:--reporters <value>
--sourcemaps(Boolean)(默認(rèn)值:true)輸出源映射鞍陨。
別名:-sm,--
sourcemap
,--
sourcemaps --poll(Number)啟用并定義查看輪詢時間段(毫秒)的文件诚撵。
別名:-poll <value>
--environment(String)定義構(gòu)建環(huán)境缭裆。
別名:-e <value>,--environment <
--app(String)指定要使用的應(yīng)用程序名稱寿烟。
別名:-a <value>澈驼,-app <value>
ng版本<options ...>
輸出Angular CLI版本。
別名:v筛武,--version缝其,-v
--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。
別名:--verbose
ng xi18n <options ...>
從源代碼中提取i18n消息徘六。
--i18n-format(String)(默認(rèn)值:xlf)生成文件的輸出格式内边。
別名:-f <value>,-xmb(--i18n-format = xmb)待锈,-xlf(--i18n-format = xlf)假残,--xliff(--i18n-format = xlf),--i18nFormat <value >
--output-path(Path)(默認(rèn)值:null)放置輸出的路徑炉擅。
別名:-op <value>辉懒,--outputPath <value>
--verbose(Boolean)(默認(rèn)值:false)向輸出日志記錄添加更多詳細(xì)信息。
別名:--
verbose --progress(Boolean)(默認(rèn)值:true)運(yùn)行時將進(jìn)度記錄到控制臺谍失。
別名:--progress
--app(String)指定要使用的應(yīng)用程序名稱眶俩。
別名:-a <value>,-app <value>
--locale(String)指定應(yīng)用程序的源語言快鱼。
別名:-l <value>颠印,--locale <value>
--out-file(String)要輸出的文件的名稱。
別名:-of <value>抹竹,--outFile <value>
英文原文
ng help
ng build <options...>
Builds your app and places it into the output path (dist/ by default).
aliases: b
--target (String) (Default: development) Defines the build target.
aliases: -t <value>, -dev (--target=development), -prod (--target=production), --target <value>
--environment (String) Defines the build environment.
aliases: -e <value>, --environment <value>
--output-path (Path) Path where output will be placed.
aliases: -op <value>, --outputPath <value>
--aot (Boolean) Build using Ahead of Time compilation.
aliases: -aot
--sourcemaps (Boolean) Output sourcemaps.
aliases: -sm, --sourcemap, --sourcemaps
--vendor-chunk (Boolean) Use a separate bundle containing only vendor libraries.
aliases: -vc, --vendorChunk
--common-chunk (Boolean) (Default: true) Use a separate bundle containing code used across multiple bundles.
aliases: -cc, --commonChunk
--base-href (String) Base url for the application being built.
aliases: -bh <value>, --baseHref <value>
--deploy-url (String) URL where files will be deployed.
aliases: -d <value>, --deployUrl <value>
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
--progress (Boolean) (Default: true) Log progress to the console while building.
aliases: -pr, --progress
--i18n-file (String) Localization file to use for i18n.
aliases: --i18nFile <value>
--i18n-format (String) Format of the localization file specified with --i18n-file.
aliases: --i18nFormat <value>
--locale (String) Locale to use for i18n.
aliases: --locale <value>
--extract-css (Boolean) Extract css from global styles onto css files instead of js ones.
aliases: -ec, --extractCss
--watch (Boolean) (Default: false) Run build when files change.
aliases: -w, --watch
--output-hashing=none|all|media|bundles (String) Define the output filename cache-busting hashing mode.
aliases: -oh <value>, --outputHashing <value>
--poll (Number) Enable and define the file watching poll time period (milliseconds).
aliases: -poll <value>
--app (String) Specifies app name or index to use.
aliases: -a <value>, -app <value>
--delete-output-path (Boolean) (Default: true) Delete output path before build.
aliases: -dop, --deleteOutputPath
--preserve-symlinks (Boolean) (Default: false) Do not use the real path when resolving modules.
aliases: --preserveSymlinks
--extract-licenses (Boolean) (Default: true) Extract all licenses in a separate file, in the case of production builds only.
aliases: --extractLicenses
--show-circular-dependencies (Boolean) (Default: true) Show circular dependency warnings on builds.
aliases: -scd, --showCircularDependencies
--build-optimizer (Boolean) (Default: false) (Experimental) Enables @angular-devkit/build-optimizer optimizations when using --aot
.
aliases: --buildOptimizer
--named-chunks (Boolean) Use file name for lazy loaded chunks.
aliases: -nc, --namedChunks
--stats-json (Boolean) (Default: false) Generates a stats.json
file which can be analyzed using tools such as: webpack-bundle-analyzer
or https://webpack.github.io/analyse.
aliases: --statsJson
ng completion <options...>
Adds autocomplete functionality to ng
commands and subcommands.
--all (Boolean) (Default: true) Generate a completion script compatible with both bash and zsh.
aliases: -a, -all
--bash (Boolean) (Default: false) Generate a completion script for bash.
aliases: -b, -bash
--zsh (Boolean) (Default: false) Generate a completion script for zsh.
aliases: -z, -zsh
ng doc <keyword> <options...>
Opens the official Angular API documentation for a given keyword.
--search (Boolean) (Default: false) Search whole angular.io instead of just api.
aliases: -s, --search
ng e2e <options...>
Run e2e tests in existing project.
aliases: e
--target (String) (Default: development) Defines the build target.
aliases: -t <value>, -dev (--target=development), -prod (--target=production), --target <value>
--environment (String) Defines the build environment.
aliases: -e <value>, --environment <value>
--output-path (Path) Path where output will be placed.
aliases: -op <value>, --outputPath <value>
--aot (Boolean) Build using Ahead of Time compilation.
aliases: -aot
--sourcemaps (Boolean) Output sourcemaps.
aliases: -sm, --sourcemap, --sourcemaps
--vendor-chunk (Boolean) Use a separate bundle containing only vendor libraries.
aliases: -vc, --vendorChunk
--common-chunk (Boolean) (Default: true) Use a separate bundle containing code used across multiple bundles.
aliases: -cc, --commonChunk
--base-href (String) Base url for the application being built.
aliases: -bh <value>, --baseHref <value>
--deploy-url (String) URL where files will be deployed.
aliases: -d <value>, --deployUrl <value>
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
--progress (Boolean) (Default: true) Log progress to the console while building.
aliases: -pr, --progress
--i18n-file (String) Localization file to use for i18n.
aliases: --i18nFile <value>
--i18n-format (String) Format of the localization file specified with --i18n-file.
aliases: --i18nFormat <value>
--locale (String) Locale to use for i18n.
aliases: --locale <value>
--extract-css (Boolean) Extract css from global styles onto css files instead of js ones.
aliases: -ec, --extractCss
--watch (Boolean) (Default: false) Run build when files change.
aliases: -w, --watch
--output-hashing=none|all|media|bundles (String) Define the output filename cache-busting hashing mode.
aliases: -oh <value>, --outputHashing <value>
--poll (Number) Enable and define the file watching poll time period (milliseconds).
aliases: -poll <value>
--app (String) Specifies app name or index to use.
aliases: -a <value>, -app <value>
--delete-output-path (Boolean) (Default: true) Delete output path before build.
aliases: -dop, --deleteOutputPath
--preserve-symlinks (Boolean) (Default: false) Do not use the real path when resolving modules.
aliases: --preserveSymlinks
--extract-licenses (Boolean) (Default: true) Extract all licenses in a separate file, in the case of production builds only.
aliases: --extractLicenses
--show-circular-dependencies (Boolean) (Default: true) Show circular dependency warnings on builds.
aliases: -scd, --showCircularDependencies
--build-optimizer (Boolean) (Default: false) (Experimental) Enables @angular-devkit/build-optimizer optimizations when using --aot
.
aliases: --buildOptimizer
--named-chunks (Boolean) Use file name for lazy loaded chunks.
aliases: -nc, --namedChunks
--port (Number) (Default: 0) The port to use to serve the application.
aliases: -p <value>, -port <value>
--host (String) (Default: localhost) Listens only on localhost by default.
aliases: -H <value>, -host <value>
--proxy-config (Path) Proxy configuration file.
aliases: -pc <value>, --proxyConfig <value>
--ssl (Boolean) (Default: false) Serve using HTTPS.
aliases: -ssl
--ssl-key (String) (Default: ssl/server.key) SSL key to use for serving HTTPS.
aliases: --sslKey <value>
--ssl-cert (String) (Default: ssl/server.crt) SSL certificate to use for serving HTTPS.
aliases: --sslCert <value>
--open (Boolean) (Default: false) Opens the url in default browser.
aliases: -o, -open
--live-reload (Boolean) (Default: true) Whether to reload the page on change, using live-reload.
aliases: -lr, --liveReload
--public-host (String) Specify the URL that the browser client will use.
aliases: --live-reload-client <value>, --publicHost <value>
--disable-host-check (Boolean) (Default: false) Don't verify connected clients are part of allowed hosts.
aliases: --disableHostCheck
--hmr (Boolean) (Default: false) Enable hot module replacement.
aliases: -hmr
--config (String) Use a specific config file. Defaults to the protractor config file in angular-cli.json.
aliases: -c <value>, --config <value>
--specs (Array) (Default: ) Override specs in the protractor config. Can send in multiple specs by repeating flag (ng e2e --specs=spec1.ts --specs=spec2.ts).
aliases: -sp <value>, --specs <value>
--element-explorer (Boolean) (Default: false) Start Protractor's Element Explorer for debugging.
aliases: -ee, --elementExplorer
--webdriver-update (Boolean) (Default: true) Try to update webdriver.
aliases: -wu, --webdriverUpdate
--serve (Boolean) (Default: true) Compile and Serve the app. All non-reload related serve options are also available (e.g. --port=4400).
aliases: -s, --serve
ng eject <options...>
Ejects your app and output the proper webpack configuration and scripts.
--target (String) (Default: development) Defines the build target.
aliases: -t <value>, -dev (--target=development), -prod (--target=production), --target <value>
--environment (String) Defines the build environment.
aliases: -e <value>, --environment <value>
--output-path (Path) Path where output will be placed.
aliases: -op <value>, --outputPath <value>
--aot (Boolean) Build using Ahead of Time compilation.
aliases: -aot
--sourcemaps (Boolean) Output sourcemaps.
aliases: -sm, --sourcemap, --sourcemaps
--vendor-chunk (Boolean) Use a separate bundle containing only vendor libraries.
aliases: -vc, --vendorChunk
--common-chunk (Boolean) (Default: true) Use a separate bundle containing code used across multiple bundles.
aliases: -cc, --commonChunk
--base-href (String) Base url for the application being built.
aliases: -bh <value>, --baseHref <value>
--deploy-url (String) URL where files will be deployed.
aliases: -d <value>, --deployUrl <value>
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
--progress (Boolean) (Default: true) Log progress to the console while building.
aliases: -pr, --progress
--i18n-file (String) Localization file to use for i18n.
aliases: --i18nFile <value>
--i18n-format (String) Format of the localization file specified with --i18n-file.
aliases: --i18nFormat <value>
--locale (String) Locale to use for i18n.
aliases: --locale <value>
--extract-css (Boolean) Extract css from global styles onto css files instead of js ones.
aliases: -ec, --extractCss
--watch (Boolean) (Default: false) Run build when files change.
aliases: -w, --watch
--output-hashing=none|all|media|bundles (String) Define the output filename cache-busting hashing mode.
aliases: -oh <value>, --outputHashing <value>
--poll (Number) Enable and define the file watching poll time period (milliseconds).
aliases: -poll <value>
--delete-output-path (Boolean) (Default: true) Delete output path before build.
aliases: -dop, --deleteOutputPath
--preserve-symlinks (Boolean) (Default: false) Do not use the real path when resolving modules.
aliases: --preserveSymlinks
--extract-licenses (Boolean) (Default: true) Extract all licenses in a separate file, in the case of production builds only.
aliases: --extractLicenses
--show-circular-dependencies (Boolean) (Default: true) Show circular dependency warnings on builds.
aliases: -scd, --showCircularDependencies
--build-optimizer (Boolean) (Default: false) (Experimental) Enables @angular-devkit/build-optimizer optimizations when using --aot
.
aliases: --buildOptimizer
--named-chunks (Boolean) Use file name for lazy loaded chunks.
aliases: -nc, --namedChunks
--force (Boolean) Overwrite any webpack.config.js and npm scripts already existing.
aliases: --force
--app (String) Specifies app name to use.
aliases: -a <value>, -app <value>
ng generate <blueprint> <options...>
Generates and/or modifies files based on a blueprint.
aliases: g
--dry-run (Boolean) (Default: false) Run through without making any changes.
aliases: -d, --dryRun
--lint-fix (Boolean) Use lint to fix files after generation.
aliases: -lf, --lintFix
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
ng get <options...>
Get a value from the configuration. Example: ng get [key]
--global (Boolean) (Default: false) Get the value in the global configuration (in your home directory).
aliases: --global
ng help <command-name (Default: all)>
Shows help for the CLI.
ng lint <options...>
Lints code in existing project.
aliases: l
--fix (Boolean) (Default: false) Fixes linting errors (may overwrite linted files).
aliases: -fix
--type-check (Boolean) (Default: false) Controls the type check for linting.
aliases: --typeCheck
--force (Boolean) (Default: false) Succeeds even if there was linting errors.
aliases: --force
--format (String) (Default: prose) Output format (prose, json, stylish, verbose, pmd, msbuild, checkstyle, vso, fileslist).
aliases: -t <value>, --format <value>
ng new <options...>
Creates a new directory and a new Angular app eg. "ng new [name]".
aliases: n
--dry-run (Boolean) (Default: false) Run through without making any changes. Will list all files that would have been created when running "ng new".
aliases: -d, --dryRun
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
--skip-install (Boolean) (Default: false) Skip installing packages.
aliases: -si, --skipInstall
--skip-git (Boolean) (Default: false) Skip initializing a git repository.
aliases: -sg, --skipGit
--skip-tests (Boolean) (Default: false) Skip creating spec files.
aliases: -st, --skipTests
--skip-commit (Boolean) (Default: false) Skip committing the first commit to git.
aliases: -sc, --skipCommit
--directory (String) The directory name to create the app in.
aliases: -dir <value>, --directory <value>
--source-dir (String) (Default: src) The name of the source directory. You can later change the value in ".angular-cli.json" (apps[0].root).
aliases: -sd <value>, --sourceDir <value>
--style (String) (Default: css) The style file default extension. Possible values: css, scss, less, sass, styl(stylus). You can later change the value in ".angular-cli.json" (defaults.styleExt).
aliases: --style <value>
--prefix (String) (Default: app) The prefix to use for all component selectors. You can later change the value in ".angular-cli.json" (apps[0].prefix).
aliases: -p <value>, --prefix <value>
--routing (Boolean) (Default: false) Generate a routing module.
aliases: --routing
--inline-style (Boolean) (Default: false) Should have an inline style.
aliases: -is, --inlineStyle
--inline-template (Boolean) (Default: false) Should have an inline template.
aliases: -it, --inlineTemplate
--minimal (Boolean) (Default: false) Should create a minimal app.
aliases: --minimal
ng serve <options...>
Builds and serves your app, rebuilding on file changes.
aliases: server, s
--target (String) (Default: development) Defines the build target.
aliases: -t <value>, -dev (--target=development), -prod (--target=production), --target <value>
--environment (String) Defines the build environment.
aliases: -e <value>, --environment <value>
--output-path (Path) Path where output will be placed.
aliases: -op <value>, --outputPath <value>
--aot (Boolean) Build using Ahead of Time compilation.
aliases: -aot
--sourcemaps (Boolean) Output sourcemaps.
aliases: -sm, --sourcemap, --sourcemaps
--vendor-chunk (Boolean) Use a separate bundle containing only vendor libraries.
aliases: -vc, --vendorChunk
--common-chunk (Boolean) (Default: true) Use a separate bundle containing code used across multiple bundles.
aliases: -cc, --commonChunk
--base-href (String) Base url for the application being built.
aliases: -bh <value>, --baseHref <value>
--deploy-url (String) URL where files will be deployed.
aliases: -d <value>, --deployUrl <value>
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
--progress (Boolean) (Default: true) Log progress to the console while building.
aliases: -pr, --progress
--i18n-file (String) Localization file to use for i18n.
aliases: --i18nFile <value>
--i18n-format (String) Format of the localization file specified with --i18n-file.
aliases: --i18nFormat <value>
--locale (String) Locale to use for i18n.
aliases: --locale <value>
--extract-css (Boolean) Extract css from global styles onto css files instead of js ones.
aliases: -ec, --extractCss
--watch (Boolean) (Default: true) Rebuild on change.
aliases: -w, --watch
--output-hashing=none|all|media|bundles (String) Define the output filename cache-busting hashing mode.
aliases: -oh <value>, --outputHashing <value>
--poll (Number) Enable and define the file watching poll time period (milliseconds).
aliases: -poll <value>
--app (String) Specifies app name or index to use.
aliases: -a <value>, -app <value>
--delete-output-path (Boolean) (Default: true) Delete output path before build.
aliases: -dop, --deleteOutputPath
--preserve-symlinks (Boolean) (Default: false) Do not use the real path when resolving modules.
aliases: --preserveSymlinks
--extract-licenses (Boolean) (Default: true) Extract all licenses in a separate file, in the case of production builds only.
aliases: --extractLicenses
--show-circular-dependencies (Boolean) (Default: true) Show circular dependency warnings on builds.
aliases: -scd, --showCircularDependencies
--build-optimizer (Boolean) (Default: false) (Experimental) Enables @angular-devkit/build-optimizer optimizations when using --aot
.
aliases: --buildOptimizer
--named-chunks (Boolean) Use file name for lazy loaded chunks.
aliases: -nc, --namedChunks
--port (Number) (Default: 4200) Port to listen to for serving.
aliases: -p <value>, -port <value>
--host (String) (Default: localhost) Listens only on localhost by default.
aliases: -H <value>, -host <value>
--proxy-config (Path) Proxy configuration file.
aliases: -pc <value>, --proxyConfig <value>
--ssl (Boolean) (Default: false) Serve using HTTPS.
aliases: -ssl
--ssl-key (String) (Default: ssl/server.key) SSL key to use for serving HTTPS.
aliases: --sslKey <value>
--ssl-cert (String) (Default: ssl/server.crt) SSL certificate to use for serving HTTPS.
aliases: --sslCert <value>
--open (Boolean) (Default: false) Opens the url in default browser.
aliases: -o, -open
--live-reload (Boolean) (Default: true) Whether to reload the page on change, using live-reload.
aliases: -lr, --liveReload
--public-host (String) Specify the URL that the browser client will use.
aliases: --live-reload-client <value>, --publicHost <value>
--disable-host-check (Boolean) (Default: false) Don't verify connected clients are part of allowed hosts.
aliases: --disableHostCheck
--hmr (Boolean) (Default: false) Enable hot module replacement.
aliases: -hmr
ng set <options...>
Set a value in the configuration.
--global (Boolean) (Default: false) Set the value in the global configuration rather than in your project's.
aliases: -g, --global
ng test <options...>
Run unit tests in existing project.
aliases: t
--watch (Boolean) Run build when files change.
aliases: -w, --watch
--code-coverage (Boolean) (Default: false) Coverage report will be in the coverage/ directory.
aliases: -cc, --codeCoverage
--config (String) Use a specific config file. Defaults to the karma config file in .angular-cli.json.
aliases: -c <value>, --config <value>
--single-run (Boolean) Run tests a single time.
aliases: -sr, --singleRun
--progress (Boolean) (Default: true) Log progress to the console while in progress.
aliases: --progress
--browsers (String) Override which browsers tests are run against.
aliases: --browsers <value>
--colors (Boolean) Enable or disable colors in the output (reporters and logs).
aliases: --colors
--log-level (String) Level of logging.
aliases: --logLevel <value>
--port (Number) Port where the web server will be listening.
aliases: -port <value>
--reporters (String) List of reporters to use.
aliases: --reporters <value>
--sourcemaps (Boolean) (Default: true) Output sourcemaps.
aliases: -sm, --sourcemap, --sourcemaps
--poll (Number) Enable and define the file watching poll time period (milliseconds).
aliases: -poll <value>
--environment (String) Defines the build environment.
aliases: -e <value>, --environment <value>
--app (String) Specifies app name to use.
aliases: -a <value>, -app <value>
ng version <options...>
Outputs Angular CLI version.
aliases: v, --version, -v
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: --verbose
ng xi18n <options...>
Extracts i18n messages from source code.
--i18n-format (String) (Default: xlf) Output format for the generated file.
aliases: -f <value>, -xmb (--i18n-format=xmb), -xlf (--i18n-format=xlf), --xliff (--i18n-format=xlf), --i18nFormat <value>
--output-path (Path) (Default: null) Path where output will be placed.
aliases: -op <value>, --outputPath <value>
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: --verbose
--progress (Boolean) (Default: true) Log progress to the console while running.
aliases: --progress
--app (String) Specifies app name to use.
aliases: -a <value>, -app <value>
--locale (String) Specifies the source language of the application.
aliases: -l <value>, --locale <value>
--out-file (String) Name of the file to output.
aliases: -of <value>, --outFile <value>