From f9145a43f67b0a0d677051f5330d699d2156b2b6 Mon Sep 17 00:00:00 2001 From: SteveSandersonMS Date: Mon, 31 Oct 2016 11:46:00 +0000 Subject: [PATCH] In Angular2Spa server-side rendering, only render the element, not an entire doc --- templates/Angular2Spa/ClientApp/boot-server.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/Angular2Spa/ClientApp/boot-server.ts b/templates/Angular2Spa/ClientApp/boot-server.ts index a5ee086..7ae129a 100644 --- a/templates/Angular2Spa/ClientApp/boot-server.ts +++ b/templates/Angular2Spa/ClientApp/boot-server.ts @@ -16,9 +16,7 @@ export default function (params: any) : Promise<{ html: string, globals?: any }> requestUrl: params.url, originUrl: params.origin, preboot: false, - // TODO: Render just the component instead of wrapping it inside an extra HTML document - // Waiting on https://github.com/angular/universal/issues/347 - document: '' + document: '' }, onHandleError: (parentZone, currentZone, targetZone, error) => { // If any error occurs while rendering the module, reject the whole operation