expresstypescriptangularangular2-universal

Difference between expressEngine and ng2engine


I am using universal-starter.

For the file server.ts, when I change

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

to

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

seems no influence on the demo.

So what is the difference between expressEngine and ng2engine?


Solution

  • Oh I found the explanation: 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'

    So right now should use expressEngine