adapted remote data build method to aggregate relation remotedata arrays

This commit is contained in:
Art Lowel
2017-05-29 13:42:11 +02:00
committed by Lotte Hofstede
parent 2b74c3034a
commit fbb64a6031
12 changed files with 67 additions and 68 deletions

View File

@@ -82,22 +82,25 @@ function ngApp(req, res) {
function onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
console.warn('Error in SSR, serving for direct CSR');
res.sendFile('index.html', { root: './src' });
return false;
}
Zone.current.fork({ name: 'CSR fallback', onHandleError }).run(() => {
res.render('index', {
req,
res,
// time: true, // use this to determine what part of your app is slow only in development
async: EnvConfig.universal.async,
preboot: EnvConfig.universal.preboot,
baseUrl: EnvConfig.ui.nameSpace,
requestUrl: req.originalUrl,
originUrl: EnvConfig.ui.baseUrl
if (EnvConfig.universal.preboot) {
Zone.current.fork({ name: 'CSR fallback', onHandleError }).run(() => {
res.render('index', {
req,
res,
// time: true, // use this to determine what part of your app is slow only in development
async: EnvConfig.universal.async,
preboot: EnvConfig.universal.preboot,
baseUrl: EnvConfig.ui.nameSpace,
requestUrl: req.originalUrl,
originUrl: EnvConfig.ui.baseUrl
});
});
});
}
else {
res.sendFile('index.html', { root: './src' });
}
}
/**