1 | import * as i0 from '@angular/core';
|
2 | import { ElementRef, Injector, Directive, EventEmitter, Inject, Output, NgModule } from '@angular/core';
|
3 | import { DOCUMENT } from '@angular/common';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | function throwNullPortalError() {
|
17 | throw Error('Must provide a portal to attach');
|
18 | }
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | function throwPortalAlreadyAttachedError() {
|
24 | throw Error('Host already has a portal attached');
|
25 | }
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | function throwPortalOutletAlreadyDisposedError() {
|
31 | throw Error('This PortalOutlet has already been disposed');
|
32 | }
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | function throwUnknownPortalTypeError() {
|
38 | throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +
|
39 | 'a ComponentPortal or a TemplatePortal.');
|
40 | }
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | function throwNullPortalOutletError() {
|
46 | throw Error('Attempting to attach a portal to a null PortalOutlet');
|
47 | }
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | function throwNoPortalAttachedError() {
|
53 | throw Error('Attempting to detach a portal that is not attached to a host');
|
54 | }
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 | class Portal {
|
68 |
|
69 | attach(host) {
|
70 | if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
71 | if (host == null) {
|
72 | throwNullPortalOutletError();
|
73 | }
|
74 | if (host.hasAttached()) {
|
75 | throwPortalAlreadyAttachedError();
|
76 | }
|
77 | }
|
78 | this._attachedHost = host;
|
79 | return host.attach(this);
|
80 | }
|
81 |
|
82 | detach() {
|
83 | let host = this._attachedHost;
|
84 | if (host != null) {
|
85 | this._attachedHost = null;
|
86 | host.detach();
|
87 | }
|
88 | else if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
89 | throwNoPortalAttachedError();
|
90 | }
|
91 | }
|
92 |
|
93 | get isAttached() {
|
94 | return this._attachedHost != null;
|
95 | }
|
96 | |
97 |
|
98 |
|
99 |
|
100 | setAttachedHost(host) {
|
101 | this._attachedHost = host;
|
102 | }
|
103 | }
|
104 |
|
105 |
|
106 |
|
107 | class ComponentPortal extends Portal {
|
108 | constructor(component, viewContainerRef, injector, componentFactoryResolver) {
|
109 | super();
|
110 | this.component = component;
|
111 | this.viewContainerRef = viewContainerRef;
|
112 | this.injector = injector;
|
113 | this.componentFactoryResolver = componentFactoryResolver;
|
114 | }
|
115 | }
|
116 |
|
117 |
|
118 |
|
119 | class TemplatePortal extends Portal {
|
120 | constructor(
|
121 | /** The embedded template that will be used to instantiate an embedded View in the host. */
|
122 | templateRef,
|
123 | /** Reference to the ViewContainer into which the template will be stamped out. */
|
124 | viewContainerRef,
|
125 | /** Contextual data to be passed in to the embedded view. */
|
126 | context,
|
127 | /** The injector to use for the embedded view. */
|
128 | injector) {
|
129 | super();
|
130 | this.templateRef = templateRef;
|
131 | this.viewContainerRef = viewContainerRef;
|
132 | this.context = context;
|
133 | this.injector = injector;
|
134 | }
|
135 | get origin() {
|
136 | return this.templateRef.elementRef;
|
137 | }
|
138 | |
139 |
|
140 |
|
141 |
|
142 |
|
143 | attach(host, context = this.context) {
|
144 | this.context = context;
|
145 | return super.attach(host);
|
146 | }
|
147 | detach() {
|
148 | this.context = undefined;
|
149 | return super.detach();
|
150 | }
|
151 | }
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 | class DomPortal extends Portal {
|
158 | constructor(element) {
|
159 | super();
|
160 | this.element = element instanceof ElementRef ? element.nativeElement : element;
|
161 | }
|
162 | }
|
163 |
|
164 |
|
165 |
|
166 |
|
167 | class BasePortalOutlet {
|
168 | constructor() {
|
169 |
|
170 | this._isDisposed = false;
|
171 |
|
172 | this.attachDomPortal = null;
|
173 | }
|
174 |
|
175 | hasAttached() {
|
176 | return !!this._attachedPortal;
|
177 | }
|
178 |
|
179 | attach(portal) {
|
180 | if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
181 | if (!portal) {
|
182 | throwNullPortalError();
|
183 | }
|
184 | if (this.hasAttached()) {
|
185 | throwPortalAlreadyAttachedError();
|
186 | }
|
187 | if (this._isDisposed) {
|
188 | throwPortalOutletAlreadyDisposedError();
|
189 | }
|
190 | }
|
191 | if (portal instanceof ComponentPortal) {
|
192 | this._attachedPortal = portal;
|
193 | return this.attachComponentPortal(portal);
|
194 | }
|
195 | else if (portal instanceof TemplatePortal) {
|
196 | this._attachedPortal = portal;
|
197 | return this.attachTemplatePortal(portal);
|
198 |
|
199 | }
|
200 | else if (this.attachDomPortal && portal instanceof DomPortal) {
|
201 | this._attachedPortal = portal;
|
202 | return this.attachDomPortal(portal);
|
203 | }
|
204 | if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
205 | throwUnknownPortalTypeError();
|
206 | }
|
207 | }
|
208 |
|
209 | detach() {
|
210 | if (this._attachedPortal) {
|
211 | this._attachedPortal.setAttachedHost(null);
|
212 | this._attachedPortal = null;
|
213 | }
|
214 | this._invokeDisposeFn();
|
215 | }
|
216 |
|
217 | dispose() {
|
218 | if (this.hasAttached()) {
|
219 | this.detach();
|
220 | }
|
221 | this._invokeDisposeFn();
|
222 | this._isDisposed = true;
|
223 | }
|
224 |
|
225 | setDisposeFn(fn) {
|
226 | this._disposeFn = fn;
|
227 | }
|
228 | _invokeDisposeFn() {
|
229 | if (this._disposeFn) {
|
230 | this._disposeFn();
|
231 | this._disposeFn = null;
|
232 | }
|
233 | }
|
234 | }
|
235 |
|
236 |
|
237 |
|
238 |
|
239 | class BasePortalHost extends BasePortalOutlet {
|
240 | }
|
241 |
|
242 |
|
243 |
|
244 |
|
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
|
253 | class DomPortalOutlet extends BasePortalOutlet {
|
254 | |
255 |
|
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 | constructor(
|
266 | /** Element into which the content is projected. */
|
267 | outletElement, _componentFactoryResolver, _appRef, _defaultInjector,
|
268 | /**
|
269 | * @deprecated `_document` Parameter to be made required.
|
270 | * @breaking-change 10.0.0
|
271 | */
|
272 | _document) {
|
273 | super();
|
274 | this.outletElement = outletElement;
|
275 | this._componentFactoryResolver = _componentFactoryResolver;
|
276 | this._appRef = _appRef;
|
277 | this._defaultInjector = _defaultInjector;
|
278 | |
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 | this.attachDomPortal = (portal) => {
|
285 |
|
286 |
|
287 | if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
288 | throw Error('Cannot attach DOM portal without _document constructor parameter');
|
289 | }
|
290 | const element = portal.element;
|
291 | if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
292 | throw Error('DOM portal content must be attached to a parent node.');
|
293 | }
|
294 |
|
295 |
|
296 | const anchorNode = this._document.createComment('dom-portal');
|
297 | element.parentNode.insertBefore(anchorNode, element);
|
298 | this.outletElement.appendChild(element);
|
299 | this._attachedPortal = portal;
|
300 | super.setDisposeFn(() => {
|
301 |
|
302 | if (anchorNode.parentNode) {
|
303 | anchorNode.parentNode.replaceChild(element, anchorNode);
|
304 | }
|
305 | });
|
306 | };
|
307 | this._document = _document;
|
308 | }
|
309 | |
310 |
|
311 |
|
312 |
|
313 |
|
314 | attachComponentPortal(portal) {
|
315 | const resolver = (portal.componentFactoryResolver || this._componentFactoryResolver);
|
316 | if ((typeof ngDevMode === 'undefined' || ngDevMode) && !resolver) {
|
317 | throw Error('Cannot attach component portal to outlet without a ComponentFactoryResolver.');
|
318 | }
|
319 | const componentFactory = resolver.resolveComponentFactory(portal.component);
|
320 | let componentRef;
|
321 |
|
322 |
|
323 |
|
324 |
|
325 | if (portal.viewContainerRef) {
|
326 | componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.injector);
|
327 | this.setDisposeFn(() => componentRef.destroy());
|
328 | }
|
329 | else {
|
330 | if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {
|
331 | throw Error('Cannot attach component portal to outlet without an ApplicationRef.');
|
332 | }
|
333 | componentRef = componentFactory.create(portal.injector || this._defaultInjector || Injector.NULL);
|
334 | this._appRef.attachView(componentRef.hostView);
|
335 | this.setDisposeFn(() => {
|
336 |
|
337 |
|
338 | if (this._appRef.viewCount > 0) {
|
339 | this._appRef.detachView(componentRef.hostView);
|
340 | }
|
341 | componentRef.destroy();
|
342 | });
|
343 | }
|
344 |
|
345 |
|
346 | this.outletElement.appendChild(this._getComponentRootNode(componentRef));
|
347 | this._attachedPortal = portal;
|
348 | return componentRef;
|
349 | }
|
350 | |
351 |
|
352 |
|
353 |
|
354 |
|
355 | attachTemplatePortal(portal) {
|
356 | let viewContainer = portal.viewContainerRef;
|
357 | let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {
|
358 | injector: portal.injector,
|
359 | });
|
360 |
|
361 |
|
362 |
|
363 |
|
364 | viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));
|
365 |
|
366 |
|
367 |
|
368 | viewRef.detectChanges();
|
369 | this.setDisposeFn(() => {
|
370 | let index = viewContainer.indexOf(viewRef);
|
371 | if (index !== -1) {
|
372 | viewContainer.remove(index);
|
373 | }
|
374 | });
|
375 | this._attachedPortal = portal;
|
376 |
|
377 | return viewRef;
|
378 | }
|
379 | |
380 |
|
381 |
|
382 | dispose() {
|
383 | super.dispose();
|
384 | this.outletElement.remove();
|
385 | }
|
386 |
|
387 | _getComponentRootNode(componentRef) {
|
388 | return componentRef.hostView.rootNodes[0];
|
389 | }
|
390 | }
|
391 |
|
392 |
|
393 |
|
394 |
|
395 | class DomPortalHost extends DomPortalOutlet {
|
396 | }
|
397 |
|
398 |
|
399 |
|
400 |
|
401 |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 |
|
407 |
|
408 |
|
409 | class CdkPortal extends TemplatePortal {
|
410 | constructor(templateRef, viewContainerRef) {
|
411 | super(templateRef, viewContainerRef);
|
412 | }
|
413 | }
|
414 | CdkPortal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkPortal, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
415 | CdkPortal.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: CdkPortal, selector: "[cdkPortal]", exportAs: ["cdkPortal"], usesInheritance: true, ngImport: i0 });
|
416 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkPortal, decorators: [{
|
417 | type: Directive,
|
418 | args: [{
|
419 | selector: '[cdkPortal]',
|
420 | exportAs: 'cdkPortal',
|
421 | }]
|
422 | }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
423 |
|
424 |
|
425 |
|
426 |
|
427 | class TemplatePortalDirective extends CdkPortal {
|
428 | }
|
429 | TemplatePortalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: TemplatePortalDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
430 | TemplatePortalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: TemplatePortalDirective, selector: "[cdk-portal], [portal]", providers: [
|
431 | {
|
432 | provide: CdkPortal,
|
433 | useExisting: TemplatePortalDirective,
|
434 | },
|
435 | ], exportAs: ["cdkPortal"], usesInheritance: true, ngImport: i0 });
|
436 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: TemplatePortalDirective, decorators: [{
|
437 | type: Directive,
|
438 | args: [{
|
439 | selector: '[cdk-portal], [portal]',
|
440 | exportAs: 'cdkPortal',
|
441 | providers: [
|
442 | {
|
443 | provide: CdkPortal,
|
444 | useExisting: TemplatePortalDirective,
|
445 | },
|
446 | ],
|
447 | }]
|
448 | }] });
|
449 |
|
450 |
|
451 |
|
452 |
|
453 |
|
454 |
|
455 |
|
456 | class CdkPortalOutlet extends BasePortalOutlet {
|
457 | constructor(_componentFactoryResolver, _viewContainerRef,
|
458 | /**
|
459 | * @deprecated `_document` parameter to be made required.
|
460 | * @breaking-change 9.0.0
|
461 | */
|
462 | _document) {
|
463 | super();
|
464 | this._componentFactoryResolver = _componentFactoryResolver;
|
465 | this._viewContainerRef = _viewContainerRef;
|
466 |
|
467 | this._isInitialized = false;
|
468 |
|
469 | this.attached = new EventEmitter();
|
470 | |
471 |
|
472 |
|
473 |
|
474 |
|
475 |
|
476 | this.attachDomPortal = (portal) => {
|
477 |
|
478 |
|
479 | if (!this._document && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
480 | throw Error('Cannot attach DOM portal without _document constructor parameter');
|
481 | }
|
482 | const element = portal.element;
|
483 | if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
484 | throw Error('DOM portal content must be attached to a parent node.');
|
485 | }
|
486 |
|
487 |
|
488 | const anchorNode = this._document.createComment('dom-portal');
|
489 | portal.setAttachedHost(this);
|
490 | element.parentNode.insertBefore(anchorNode, element);
|
491 | this._getRootNode().appendChild(element);
|
492 | this._attachedPortal = portal;
|
493 | super.setDisposeFn(() => {
|
494 | if (anchorNode.parentNode) {
|
495 | anchorNode.parentNode.replaceChild(element, anchorNode);
|
496 | }
|
497 | });
|
498 | };
|
499 | this._document = _document;
|
500 | }
|
501 |
|
502 | get portal() {
|
503 | return this._attachedPortal;
|
504 | }
|
505 | set portal(portal) {
|
506 |
|
507 |
|
508 |
|
509 |
|
510 | if (this.hasAttached() && !portal && !this._isInitialized) {
|
511 | return;
|
512 | }
|
513 | if (this.hasAttached()) {
|
514 | super.detach();
|
515 | }
|
516 | if (portal) {
|
517 | super.attach(portal);
|
518 | }
|
519 | this._attachedPortal = portal || null;
|
520 | }
|
521 |
|
522 | get attachedRef() {
|
523 | return this._attachedRef;
|
524 | }
|
525 | ngOnInit() {
|
526 | this._isInitialized = true;
|
527 | }
|
528 | ngOnDestroy() {
|
529 | super.dispose();
|
530 | this._attachedPortal = null;
|
531 | this._attachedRef = null;
|
532 | }
|
533 | |
534 |
|
535 |
|
536 |
|
537 |
|
538 |
|
539 | attachComponentPortal(portal) {
|
540 | portal.setAttachedHost(this);
|
541 |
|
542 |
|
543 | const viewContainerRef = portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;
|
544 | const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;
|
545 | const componentFactory = resolver.resolveComponentFactory(portal.component);
|
546 | const ref = viewContainerRef.createComponent(componentFactory, viewContainerRef.length, portal.injector || viewContainerRef.injector);
|
547 |
|
548 |
|
549 |
|
550 | if (viewContainerRef !== this._viewContainerRef) {
|
551 | this._getRootNode().appendChild(ref.hostView.rootNodes[0]);
|
552 | }
|
553 | super.setDisposeFn(() => ref.destroy());
|
554 | this._attachedPortal = portal;
|
555 | this._attachedRef = ref;
|
556 | this.attached.emit(ref);
|
557 | return ref;
|
558 | }
|
559 | |
560 |
|
561 |
|
562 |
|
563 |
|
564 | attachTemplatePortal(portal) {
|
565 | portal.setAttachedHost(this);
|
566 | const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {
|
567 | injector: portal.injector,
|
568 | });
|
569 | super.setDisposeFn(() => this._viewContainerRef.clear());
|
570 | this._attachedPortal = portal;
|
571 | this._attachedRef = viewRef;
|
572 | this.attached.emit(viewRef);
|
573 | return viewRef;
|
574 | }
|
575 |
|
576 | _getRootNode() {
|
577 | const nativeElement = this._viewContainerRef.element.nativeElement;
|
578 |
|
579 |
|
580 | return (nativeElement.nodeType === nativeElement.ELEMENT_NODE
|
581 | ? nativeElement
|
582 | : nativeElement.parentNode);
|
583 | }
|
584 | }
|
585 | CdkPortalOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkPortalOutlet, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
|
586 | CdkPortalOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: { portal: ["cdkPortalOutlet", "portal"] }, outputs: { attached: "attached" }, exportAs: ["cdkPortalOutlet"], usesInheritance: true, ngImport: i0 });
|
587 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: CdkPortalOutlet, decorators: [{
|
588 | type: Directive,
|
589 | args: [{
|
590 | selector: '[cdkPortalOutlet]',
|
591 | exportAs: 'cdkPortalOutlet',
|
592 | inputs: ['portal: cdkPortalOutlet'],
|
593 | }]
|
594 | }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: undefined, decorators: [{
|
595 | type: Inject,
|
596 | args: [DOCUMENT]
|
597 | }] }]; }, propDecorators: { attached: [{
|
598 | type: Output
|
599 | }] } });
|
600 |
|
601 |
|
602 |
|
603 |
|
604 | class PortalHostDirective extends CdkPortalOutlet {
|
605 | }
|
606 | PortalHostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: PortalHostDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
607 | PortalHostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.1", type: PortalHostDirective, selector: "[cdkPortalHost], [portalHost]", inputs: { portal: ["cdkPortalHost", "portal"] }, providers: [
|
608 | {
|
609 | provide: CdkPortalOutlet,
|
610 | useExisting: PortalHostDirective,
|
611 | },
|
612 | ], exportAs: ["cdkPortalHost"], usesInheritance: true, ngImport: i0 });
|
613 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: PortalHostDirective, decorators: [{
|
614 | type: Directive,
|
615 | args: [{
|
616 | selector: '[cdkPortalHost], [portalHost]',
|
617 | exportAs: 'cdkPortalHost',
|
618 | inputs: ['portal: cdkPortalHost'],
|
619 | providers: [
|
620 | {
|
621 | provide: CdkPortalOutlet,
|
622 | useExisting: PortalHostDirective,
|
623 | },
|
624 | ],
|
625 | }]
|
626 | }] });
|
627 | class PortalModule {
|
628 | }
|
629 | PortalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: PortalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
630 | PortalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.1", ngImport: i0, type: PortalModule, declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective], exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective] });
|
631 | PortalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: PortalModule });
|
632 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: PortalModule, decorators: [{
|
633 | type: NgModule,
|
634 | args: [{
|
635 | exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],
|
636 | declarations: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],
|
637 | }]
|
638 | }] });
|
639 |
|
640 |
|
641 |
|
642 |
|
643 |
|
644 |
|
645 |
|
646 |
|
647 |
|
648 |
|
649 |
|
650 |
|
651 |
|
652 |
|
653 |
|
654 | class PortalInjector {
|
655 | constructor(_parentInjector, _customTokens) {
|
656 | this._parentInjector = _parentInjector;
|
657 | this._customTokens = _customTokens;
|
658 | }
|
659 | get(token, notFoundValue) {
|
660 | const value = this._customTokens.get(token);
|
661 | if (typeof value !== 'undefined') {
|
662 | return value;
|
663 | }
|
664 | return this._parentInjector.get(token, notFoundValue);
|
665 | }
|
666 | }
|
667 |
|
668 |
|
669 |
|
670 |
|
671 |
|
672 |
|
673 |
|
674 |
|
675 |
|
676 |
|
677 |
|
678 |
|
679 |
|
680 |
|
681 |
|
682 |
|
683 |
|
684 |
|
685 |
|
686 |
|
687 |
|
688 | export { BasePortalHost, BasePortalOutlet, CdkPortal, CdkPortalOutlet, ComponentPortal, DomPortal, DomPortalHost, DomPortalOutlet, Portal, PortalHostDirective, PortalInjector, PortalModule, TemplatePortal, TemplatePortalDirective };
|
689 |
|