MCPcopy Index your code
hub / github.com/angular/angular-cli / asyncDestroyPlatform

Function asyncDestroyPlatform

packages/angular/ssr/src/utils/ng.ts:179–189  ·  view source on GitHub ↗

* Gracefully destroys the application in a macrotask, allowing pending promises to resolve * and surfacing any potential errors to the user. * * @param platformRef - The platform reference to be destroyed.

(platformRef: PlatformRef)

Source from the content-addressed store, hash-verified

177 * @param platformRef - The platform reference to be destroyed.
178 */
179function asyncDestroyPlatform(platformRef: PlatformRef): Promise<void> {
180 return new Promise((resolve) => {
181 setTimeout(() => {
182 if (!platformRef.destroyed) {
183 platformRef.destroy();
184 }
185
186 resolve();
187 }, 0);
188 });
189}
190
191/**
192 * Constructs a normalized and serialized URL string from its components.

Callers 1

renderAngularFunction · 0.85

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected