mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 10:08:57 +00:00
In Angular2Spa server-side rendering, only render the <app> element, not an entire <html> doc
This commit is contained in:
@@ -16,9 +16,7 @@ export default function (params: any) : Promise<{ html: string, globals?: any }>
|
|||||||
requestUrl: params.url,
|
requestUrl: params.url,
|
||||||
originUrl: params.origin,
|
originUrl: params.origin,
|
||||||
preboot: false,
|
preboot: false,
|
||||||
// TODO: Render just the <app> component instead of wrapping it inside an extra HTML document
|
document: '<app></app>'
|
||||||
// Waiting on https://github.com/angular/universal/issues/347
|
|
||||||
document: '<!DOCTYPE html><html><head></head><body><app></app></body></html>'
|
|
||||||
},
|
},
|
||||||
onHandleError: (parentZone, currentZone, targetZone, error) => {
|
onHandleError: (parentZone, currentZone, targetZone, error) => {
|
||||||
// If any error occurs while rendering the module, reject the whole operation
|
// If any error occurs while rendering the module, reject the whole operation
|
||||||
|
|||||||
Reference in New Issue
Block a user