UNPKG

@grafana/runtime

Version:
1 lines 1.04 kB
{"version":3,"file":"legacyAngularInjector.mjs","sources":["../../../src/services/legacyAngularInjector.ts"],"sourcesContent":["import { auto } from 'angular';\n\nlet singleton: auto.IInjectorService;\n\n/**\n * Used during startup by Grafana to temporarily expose the angular injector to\n * pure javascript plugins using {@link getLegacyAngularInjector}.\n *\n * @internal\n */\nexport const setLegacyAngularInjector = (instance: auto.IInjectorService) => {\n singleton = instance;\n};\n\n/**\n * WARNING: this function provides a temporary way for plugins to access anything in the\n * angular injector. While the migration from angular to react continues, there are a few\n * options that do not yet have good alternatives. Note that use of this function will\n * be removed in the future.\n *\n * @beta\n */\nexport const getLegacyAngularInjector = (): auto.IInjectorService => singleton;\n"],"names":[],"mappings":"AAEA,IAAI,SAAA;AAQS,MAAA,wBAAA,GAA2B,CAAC,QAAoC,KAAA;AAC3E,EAAY,SAAA,GAAA,QAAA;AACd;AAUO,MAAM,2BAA2B,MAA6B;;;;"}