Skip to content

Commit f9145a4

Browse files
In Angular2Spa server-side rendering, only render the <app> element, not an entire <html> doc
1 parent da51cd5 commit f9145a4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

templates/Angular2Spa/ClientApp/boot-server.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ export default function (params: any) : Promise<{ html: string, globals?: any }>
1616
requestUrl: params.url,
1717
originUrl: params.origin,
1818
preboot: false,
19-
// TODO: Render just the <app> component instead of wrapping it inside an extra HTML document
20-
// Waiting on https://github.com/angular/universal/issues/347
21-
document: '<!DOCTYPE html><html><head></head><body><app></app></body></html>'
19+
document: '<app></app>'
2220
},
2321
onHandleError: (parentZone, currentZone, targetZone, error) => {
2422
// If any error occurs while rendering the module, reject the whole operation

0 commit comments

Comments
 (0)