portal.mjs 1.1 KB

1234567891011121314151617181920212223242526272829
  1. export { a as BasePortalHost, B as BasePortalOutlet, d as CdkPortal, f as CdkPortalOutlet, C as ComponentPortal, D as DomPortal, c as DomPortalHost, b as DomPortalOutlet, P as Portal, g as PortalHostDirective, h as PortalModule, T as TemplatePortal, e as TemplatePortalDirective } from './portal-directives-Bw5woq8I.mjs';
  2. import '@angular/core';
  3. import '@angular/common';
  4. /**
  5. * Custom injector to be used when providing custom
  6. * injection tokens to components inside a portal.
  7. * @docs-private
  8. * @deprecated Use `Injector.create` instead.
  9. * @breaking-change 11.0.0
  10. */
  11. class PortalInjector {
  12. _parentInjector;
  13. _customTokens;
  14. constructor(_parentInjector, _customTokens) {
  15. this._parentInjector = _parentInjector;
  16. this._customTokens = _customTokens;
  17. }
  18. get(token, notFoundValue) {
  19. const value = this._customTokens.get(token);
  20. if (typeof value !== 'undefined') {
  21. return value;
  22. }
  23. return this._parentInjector.get(token, notFoundValue);
  24. }
  25. }
  26. export { PortalInjector };
  27. //# sourceMappingURL=portal.mjs.map