angular – * .ngsummary.json的目的是什么

我刚刚学习了AOT,ngc等.运行ngc之后,我看到了很多* .ngsummary.json(在src文件夹中,* .ts文件旁边).

它们适用于什么?

最佳答案 这显然是AOT编译器使用的NgFactory文件的新名称.在此页面上搜索NgFactory
Ahead-of-Time Compilation

提取:

After ngc completes, look for a collection of NgFactory files in the aot folder. The aot folder is the directory specified as genDir in tsconfig-aot.json.

These factory files are essential to the compiled application. Each component factory creates an instance of the component at runtime by combining the original class file and a JavaScript representation of the component’s template. Note that the original component class is still referenced internally by the generated factory.

点赞