Skip to content

Commit 41d1c14

Browse files
laskoviymishkaSteveSandersonMS
authored andcommitted
bug(ng2-template): fix issue with not disposed boot object
1 parent 58a1aa3 commit 41d1c14

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

templates/Angular2Spa/ClientApp/boot-server.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ export default function (params: any): Promise<{ html: string, globals?: any }>
1515
...ngUniversal.NODE_HTTP_PROVIDERS,
1616
];
1717

18-
return ngUniversal.bootloader({
18+
let bootloader = ngUniversal.bootloader({
1919
directives: [App],
2020
componentProviders: serverBindings,
2121
async: true,
2222
preboot: false,
2323
// TODO: Render just the <app> component instead of wrapping it inside an extra HTML document
2424
// Waiting on https://github.com/angular/universal/issues/347
2525
template: '<!DOCTYPE html>\n<html><head></head><body><app></app></body></html>'
26-
}).serializeApplication().then(html => {
26+
});
27+
28+
return bootloader.serializeApplication().then(html => {
29+
bootloader.dispose();
2730
return { html };
2831
});
2932
}

0 commit comments

Comments
 (0)