ngc 命令在 angular 应用程序中有什么作用?

What does the ngc command do in an angular app?

我刚刚在教程中看到这个命令,我正在努力寻找有关 ngc 命令的任何信息。任何人都可以解释一下吗?

ng build --prod && ngc

它与 Angular 模板编译器有关。

ngctsc.

的直接替代品

根据回购文档:

First install angular, see https://github.com/angular/angular/blob/master/CHANGELOG.md#200-rc0-2016-05-02

$ npm install @angular/compiler-cli typescript@next @angular/platform-server @angular/compiler

Optional sanity check, make sure TypeScript can compile.

$ ./node_modules/.bin/tsc -p path/to/project

ngc is a drop-in replacement for tsc.

$ ./node_modules/.bin/ngc -p path/to/project

您可以找到完整的描述here