MCPcopy
hub / github.com/angular/angular / getPlatform

Function getPlatform

packages/core/src/platform/platform.ts:142–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

140 * @publicApi
141 */
142export function getPlatform(): PlatformRef | null {
143 if (typeof ngServerMode !== 'undefined' && ngServerMode) {
144 return null;
145 }
146
147 return _platformInjector?.get(PlatformRef) ?? null;
148}
149
150/**
151 * Destroys the current Angular platform and all Angular applications on the page.

Callers 10

module.tsFile · 0.90
module.tsFile · 0.90
bootstrapFnFunction · 0.90
createPlatformFunction · 0.85
createPlatformFactoryFunction · 0.85
assertPlatformFunction · 0.85
destroyPlatformFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…