MCPcopy
hub / github.com/angular/angular / exportNgVar

Function exportNgVar

packages/platform-browser/src/dom/util.ts:20–29  ·  view source on GitHub ↗
(name: string, value: any)

Source from the content-addressed store, hash-verified

18 * @param value The value to export.
19 */
20export function exportNgVar(name: string, value: any): void {
21 if (typeof COMPILED === 'undefined' || !COMPILED) {
22 // Note: we can't export `ng` when using closure enhanced optimization as:
23 // - closure declares globals itself for minified names, which sometimes clobber our `ng` global
24 // - we can't declare a closure extern as the namespace `ng` is already used within Google
25 // for typings for angularJS (via `goog.provide('ng....')`).
26 const ng = (global['ng'] = (global['ng'] as {[key: string]: any} | undefined) || {});
27 ng[name] = value;
28 }
29}

Callers 2

enableDebugToolsFunction · 0.90
disableDebugToolsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…