expressEngine 和 ng2engine 的区别

Difference between expressEngine and ng2engine

我正在使用 universal-starter

对于文件server.ts,当我更改

import { expressEngine } from 'angular2-universal';
app.engine('.html', expressEngine);

import { ng2engine } from 'angular2-universal';
app.engine('.html', ng2engine);

似乎对演示没有影响。

那么expressEngineng2engine有什么区别呢?

哦,我找到了解释: https://github.com/angular/universal/blob/ecd1ebc3dbf368fcaf9ff1804636363cba9e4723/modules/express-engine/src/engine.ts#L133

DEPRECATION WARNING: ng2engine is no longer supported and will be removed in next release. use expressEngine'

所以现在应该使用expressEngine