Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
platform.bootstrapModule(prerenderModule.AppModule).then(moduleRef => {
const state = moduleRef.injector.get(ps.PlatformState);
const appRef = moduleRef.injector.get(co.ApplicationRef);
appRef._isStable
.filter((isStable) => isStable)
.first()
.subscribe((stable) => {
try {
fs.mkdirSync('./tmp/prerender');
}
catch(e){}
fs.writeFileSync('./tmp/prerender/index.html', state.renderToString(), 'utf-8');
platform.destroy();
});
});
([] as any[]),(_l:any) => {
return i0.ɵmod([i0.ɵmpd(512,i0.ComponentFactoryResolver,i0.ɵCodegenComponentFactoryResolver,
[[8,([] as any[])],[3,i0.ComponentFactoryResolver],i0.NgModuleRef]),i0.ɵmpd(4608,
i2.TransferState,i1.ServerTransferState,[i3.PlatformState,i0.RendererFactory2]),
i0.ɵmpd(512,i1.ServerTransferStateModule,i1.ServerTransferStateModule,([] as any[]))]);
});
//# sourceMappingURL=data:application/json;base64,eyJmaWxlIjoiL1VzZXJzL3BhdHJpY2tqcy9Db2RlL0FuZ3VsYXJDbGFzcy91bml2ZXJzYWwtdHJhbnNmZXItc3RhdGUvc3JjL3NlcnZlci5uZ2ZhY3RvcnkudHMiLCJ2ZXJzaW9uIjozLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJuZzovLy9Vc2Vycy9wYXRyaWNranMvQ29kZS9Bbmd1bGFyQ2xhc3MvdW5pdmVyc2FsLXRyYW5zZmVyLXN0YXRlL3NyYy9zZXJ2ZXIudHMiXSwic291cmNlc0NvbnRlbnQiOlsiICJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==