carbon-components-angular 5.57.2 → 5.57.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/documentation/coverage.html +6 -6
- package/docs/documentation/injectables/BaseModalService.html +85 -9
- package/docs/documentation/injectables/ModalService.html +62 -3
- package/docs/documentation/injectables/PlaceholderService.html +57 -22
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/ComboBoxModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ComboBoxModule.html +4 -4
- package/docs/documentation/modules/DatePickerInputModule/dependencies.svg +37 -41
- package/docs/documentation/modules/DatePickerInputModule.html +37 -41
- package/docs/documentation/modules/DialogModule/dependencies.svg +34 -34
- package/docs/documentation/modules/DialogModule.html +34 -34
- package/docs/documentation/modules/FileUploaderModule/dependencies.svg +36 -36
- package/docs/documentation/modules/FileUploaderModule.html +36 -36
- package/docs/documentation/modules/NumberModule/dependencies.svg +4 -4
- package/docs/documentation/modules/NumberModule.html +4 -4
- package/docs/documentation/modules/RadioModule/dependencies.svg +48 -48
- package/docs/documentation/modules/RadioModule.html +48 -48
- package/docs/documentation/modules/SelectModule/dependencies.svg +43 -43
- package/docs/documentation/modules/SelectModule.html +43 -43
- package/docs/documentation/modules/SliderModule/dependencies.svg +4 -4
- package/docs/documentation/modules/SliderModule.html +4 -4
- package/docs/documentation/modules/TabsModule/dependencies.svg +69 -69
- package/docs/documentation/modules/TabsModule.html +69 -69
- package/docs/documentation/modules/TagModule/dependencies.svg +37 -37
- package/docs/documentation/modules/TagModule.html +37 -37
- package/docs/documentation/modules/ThemeModule/dependencies.svg +14 -14
- package/docs/documentation/modules/ThemeModule.html +14 -14
- package/docs/documentation/modules/TilesModule/dependencies.svg +91 -91
- package/docs/documentation/modules/TilesModule.html +91 -91
- package/docs/documentation/modules/TimePickerModule/dependencies.svg +18 -18
- package/docs/documentation/modules/TimePickerModule.html +18 -18
- package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +23 -23
- package/docs/documentation/modules/TimePickerSelectModule.html +23 -23
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +35 -35
- package/docs/documentation/modules/TreeviewModule.html +35 -35
- package/docs/documentation.json +104 -87
- package/docs/storybook/{3931.b0862ad7.iframe.bundle.js → 3931.36351824.iframe.bundle.js} +1 -1
- package/docs/storybook/{7773.b5e74332.iframe.bundle.js → 7773.e984a82c.iframe.bundle.js} +1 -1
- package/docs/storybook/combobox-combobox-stories.67eec93c.iframe.bundle.js +1 -0
- package/docs/storybook/{dropdown-dropdown-stories.38c08419.iframe.bundle.js → dropdown-dropdown-stories.97d1c398.iframe.bundle.js} +1 -1
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/{main.ae95bbe6.iframe.bundle.js → main.23328ef9.iframe.bundle.js} +1 -1
- package/docs/storybook/modal-modal-stories.8f435f37.iframe.bundle.js +1 -0
- package/docs/storybook/{patterns-loading-large-loading-stories.d531452e.iframe.bundle.js → patterns-loading-large-loading-stories.6f92d3f6.iframe.bundle.js} +1 -1
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.07ba8b82.iframe.bundle.js → runtime~main.9e428f42.iframe.bundle.js} +1 -1
- package/esm2020/modal/base-modal.service.mjs +19 -3
- package/esm2020/placeholder/placeholder.service.mjs +7 -3
- package/fesm2015/carbon-components-angular-modal.mjs +18 -2
- package/fesm2015/carbon-components-angular-modal.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-placeholder.mjs +6 -2
- package/fesm2015/carbon-components-angular-placeholder.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-modal.mjs +18 -2
- package/fesm2020/carbon-components-angular-modal.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-placeholder.mjs +6 -2
- package/fesm2020/carbon-components-angular-placeholder.mjs.map +1 -1
- package/modal/base-modal.service.d.ts +17 -1
- package/package.json +1 -1
- package/placeholder/placeholder.service.d.ts +2 -2
- package/docs/storybook/combobox-combobox-stories.e3b860f0.iframe.bundle.js +0 -1
- package/docs/storybook/modal-modal-stories.5772b01f.iframe.bundle.js +0 -1
|
@@ -1493,9 +1493,9 @@
|
|
|
1493
1493
|
</td>
|
|
1494
1494
|
<td>injectable</td>
|
|
1495
1495
|
<td>BaseModalService</td>
|
|
1496
|
-
<td align="right" data-sort="
|
|
1497
|
-
<span class="coverage-percent">
|
|
1498
|
-
<span class="coverage-count">(
|
|
1496
|
+
<td align="right" data-sort="71">
|
|
1497
|
+
<span class="coverage-percent">71 %</span>
|
|
1498
|
+
<span class="coverage-count">(5/7)</span>
|
|
1499
1499
|
</td>
|
|
1500
1500
|
</tr>
|
|
1501
1501
|
<tr class="low">
|
|
@@ -1589,9 +1589,9 @@
|
|
|
1589
1589
|
</td>
|
|
1590
1590
|
<td>injectable</td>
|
|
1591
1591
|
<td>ModalService</td>
|
|
1592
|
-
<td align="right" data-sort="
|
|
1593
|
-
<span class="coverage-percent">
|
|
1594
|
-
<span class="coverage-count">(
|
|
1592
|
+
<td align="right" data-sort="75">
|
|
1593
|
+
<span class="coverage-percent">75 %</span>
|
|
1594
|
+
<span class="coverage-count">(6/8)</span>
|
|
1595
1595
|
</td>
|
|
1596
1596
|
</tr>
|
|
1597
1597
|
<tr class="very-good">
|
|
@@ -142,6 +142,10 @@ Uses PlaceholderService to track open instances, and for it's placeholder vi
|
|
|
142
142
|
<tr>
|
|
143
143
|
<td class="col-md-4">
|
|
144
144
|
<ul class="index-list">
|
|
145
|
+
<li>
|
|
146
|
+
<span class="modifier">Protected</span>
|
|
147
|
+
<a href="#environment" >environment</a>
|
|
148
|
+
</li>
|
|
145
149
|
<li>
|
|
146
150
|
<span class="modifier">Protected</span>
|
|
147
151
|
<span class="modifier">Static</span>
|
|
@@ -192,7 +196,7 @@ Uses PlaceholderService to track open instances, and for it's placeholder vi
|
|
|
192
196
|
</tr>
|
|
193
197
|
<tr>
|
|
194
198
|
<td class="col-md-4">
|
|
195
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
199
|
+
<div class="io-line">Defined in <a href="" data-line="36" class="link-to-prism">src/modal/base-modal.service.ts:36</a></div>
|
|
196
200
|
</td>
|
|
197
201
|
</tr>
|
|
198
202
|
|
|
@@ -257,8 +261,8 @@ Uses PlaceholderService to track open instances, and for it's placeholder vi
|
|
|
257
261
|
|
|
258
262
|
<tr>
|
|
259
263
|
<td class="col-md-4">
|
|
260
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
261
|
-
class="link-to-prism">src/modal/base-modal.service.ts:
|
|
264
|
+
<div class="io-line">Defined in <a href="" data-line="47"
|
|
265
|
+
class="link-to-prism">src/modal/base-modal.service.ts:47</a></div>
|
|
262
266
|
</td>
|
|
263
267
|
</tr>
|
|
264
268
|
|
|
@@ -335,8 +339,8 @@ Uses PlaceholderService to track open instances, and for it's placeholder vi
|
|
|
335
339
|
|
|
336
340
|
<tr>
|
|
337
341
|
<td class="col-md-4">
|
|
338
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
339
|
-
class="link-to-prism">src/modal/base-modal.service.ts:
|
|
342
|
+
<div class="io-line">Defined in <a href="" data-line="95"
|
|
343
|
+
class="link-to-prism">src/modal/base-modal.service.ts:95</a></div>
|
|
340
344
|
</td>
|
|
341
345
|
</tr>
|
|
342
346
|
|
|
@@ -391,6 +395,54 @@ When called without parameters it destroys the most recently created/top most mo
|
|
|
391
395
|
<h3 id="inputs">
|
|
392
396
|
Properties
|
|
393
397
|
</h3>
|
|
398
|
+
<table class="table table-sm table-bordered">
|
|
399
|
+
<tbody>
|
|
400
|
+
<tr>
|
|
401
|
+
<td class="col-md-4">
|
|
402
|
+
<a name="environment"></a>
|
|
403
|
+
<span class="name">
|
|
404
|
+
<span class="modifier">Protected</span>
|
|
405
|
+
<span ><b>environment</b></span>
|
|
406
|
+
<a href="#environment"><span class="icon ion-ios-link"></span></a>
|
|
407
|
+
</span>
|
|
408
|
+
</td>
|
|
409
|
+
</tr>
|
|
410
|
+
<tr>
|
|
411
|
+
<td class="col-md-4">
|
|
412
|
+
<i>Type : </i> <code>EnvironmentInjector</code>
|
|
413
|
+
|
|
414
|
+
</td>
|
|
415
|
+
</tr>
|
|
416
|
+
<tr>
|
|
417
|
+
<td class="col-md-4">
|
|
418
|
+
<i>Default value : </i><code>inject(EnvironmentInjector)</code>
|
|
419
|
+
</td>
|
|
420
|
+
</tr>
|
|
421
|
+
<tr>
|
|
422
|
+
<td class="col-md-4">
|
|
423
|
+
<div class="io-line">Defined in <a href="" data-line="36" class="link-to-prism">src/modal/base-modal.service.ts:36</a></div>
|
|
424
|
+
</td>
|
|
425
|
+
</tr>
|
|
426
|
+
|
|
427
|
+
<tr>
|
|
428
|
+
<td class="col-md-4">
|
|
429
|
+
<div class="io-description"><p>Current module/component injection enviornment
|
|
430
|
+
Allows modules to use providers from calling component</p>
|
|
431
|
+
<p>Root Module/
|
|
432
|
+
└── Lazy loaded Feature Module/
|
|
433
|
+
├── Provides Service & imports modules
|
|
434
|
+
├── Modal component (component that extends base component)
|
|
435
|
+
└── Modal component launcher (dynamically creates modal component)</p>
|
|
436
|
+
<p>Passing EnvironmentInjector in <code>createComponent</code> will look for provider declaration in feature
|
|
437
|
+
module instead of root module. This is required to pass correct context in a lazy-loaded applications.
|
|
438
|
+
Services injected in root, will also be available as feature module enviornment will also hierarchically inherit
|
|
439
|
+
the root services.</p>
|
|
440
|
+
</div>
|
|
441
|
+
</td>
|
|
442
|
+
</tr>
|
|
443
|
+
|
|
444
|
+
</tbody>
|
|
445
|
+
</table>
|
|
394
446
|
<table class="table table-sm table-bordered">
|
|
395
447
|
<tbody>
|
|
396
448
|
<tr>
|
|
@@ -417,7 +469,7 @@ When called without parameters it destroys the most recently created/top most mo
|
|
|
417
469
|
</tr>
|
|
418
470
|
<tr>
|
|
419
471
|
<td class="col-md-4">
|
|
420
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
472
|
+
<div class="io-line">Defined in <a href="" data-line="19" class="link-to-prism">src/modal/base-modal.service.ts:19</a></div>
|
|
421
473
|
</td>
|
|
422
474
|
</tr>
|
|
423
475
|
|
|
@@ -444,7 +496,7 @@ When called without parameters it destroys the most recently created/top most mo
|
|
|
444
496
|
</tr>
|
|
445
497
|
<tr>
|
|
446
498
|
<td class="col-md-4">
|
|
447
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
499
|
+
<div class="io-line">Defined in <a href="" data-line="41" class="link-to-prism">src/modal/base-modal.service.ts:41</a></div>
|
|
448
500
|
</td>
|
|
449
501
|
</tr>
|
|
450
502
|
|
|
@@ -460,7 +512,9 @@ When called without parameters it destroys the most recently created/top most mo
|
|
|
460
512
|
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
461
513
|
ComponentRef,
|
|
462
514
|
Injector,
|
|
463
|
-
Injectable
|
|
515
|
+
Injectable,
|
|
516
|
+
inject,
|
|
517
|
+
EnvironmentInjector
|
|
464
518
|
} from "@angular/core";
|
|
465
519
|
import { PlaceholderService } from "carbon-components-angular/placeholder";
|
|
466
520
|
import { tap, delay } from "rxjs/operators";
|
|
@@ -475,6 +529,23 @@ export class BaseModalService {
|
|
|
475
529
|
// track all our open modals
|
|
476
530
|
protected static modalList: Array<ComponentRef<any>> = [];
|
|
477
531
|
|
|
532
|
+
/**
|
|
533
|
+
* Current module/component injection enviornment
|
|
534
|
+
* Allows modules to use providers from calling component
|
|
535
|
+
*
|
|
536
|
+
* Root Module/
|
|
537
|
+
* └── Lazy loaded Feature Module/
|
|
538
|
+
* ├── Provides Service & imports modules
|
|
539
|
+
* ├── Modal component (component that extends base component)
|
|
540
|
+
* └── Modal component launcher (dynamically creates modal component)
|
|
541
|
+
*
|
|
542
|
+
* Passing EnvironmentInjector in `createComponent` will look for provider declaration in feature
|
|
543
|
+
* module instead of root module. This is required to pass correct context in a lazy-loaded applications.
|
|
544
|
+
* Services injected in root, will also be available as feature module enviornment will also hierarchically inherit
|
|
545
|
+
* the root services.
|
|
546
|
+
*/
|
|
547
|
+
protected environment: EnvironmentInjector = inject(EnvironmentInjector);
|
|
548
|
+
|
|
478
549
|
/**
|
|
479
550
|
* Creates an instance of `ModalService`.
|
|
480
551
|
*/
|
|
@@ -493,7 +564,12 @@ export class BaseModalService {
|
|
|
493
564
|
useValue: data.inputs[inputName]
|
|
494
565
|
}));
|
|
495
566
|
const injector = Injector.create({ providers: inputProviders });
|
|
496
|
-
const component = this.placeholderService.createComponent(
|
|
567
|
+
const component = this.placeholderService.createComponent(
|
|
568
|
+
data.component,
|
|
569
|
+
injector,
|
|
570
|
+
undefined,
|
|
571
|
+
this.environment
|
|
572
|
+
);
|
|
497
573
|
let focusedElement = document.activeElement as HTMLElement;
|
|
498
574
|
setTimeout(() => {
|
|
499
575
|
component.instance.open = true;
|
|
@@ -155,6 +155,10 @@ Uses PlaceholderService to track open instances, and for it's placeholder vi
|
|
|
155
155
|
<span class="modifier">Public</span>
|
|
156
156
|
<a href="#placeholderService" >placeholderService</a>
|
|
157
157
|
</li>
|
|
158
|
+
<li>
|
|
159
|
+
<span class="modifier">Protected</span>
|
|
160
|
+
<a href="#environment" >environment</a>
|
|
161
|
+
</li>
|
|
158
162
|
<li>
|
|
159
163
|
<span class="modifier">Protected</span>
|
|
160
164
|
<span class="modifier">Static</span>
|
|
@@ -369,7 +373,7 @@ click: clickFunction,
|
|
|
369
373
|
</tr>
|
|
370
374
|
<tr>
|
|
371
375
|
<td class="col-md-4">
|
|
372
|
-
<div class="io-line">Defined in <code><a href="../injectables/BaseModalService.html#source" target="_self" >BaseModalService:
|
|
376
|
+
<div class="io-line">Defined in <code><a href="../injectables/BaseModalService.html#source" target="_self" >BaseModalService:47</a></code>
|
|
373
377
|
</div>
|
|
374
378
|
</td>
|
|
375
379
|
</tr>
|
|
@@ -453,7 +457,7 @@ click: clickFunction,
|
|
|
453
457
|
</tr>
|
|
454
458
|
<tr>
|
|
455
459
|
<td class="col-md-4">
|
|
456
|
-
<div class="io-line">Defined in <code><a href="../injectables/BaseModalService.html#source" target="_self" >BaseModalService:
|
|
460
|
+
<div class="io-line">Defined in <code><a href="../injectables/BaseModalService.html#source" target="_self" >BaseModalService:95</a></code>
|
|
457
461
|
</div>
|
|
458
462
|
</td>
|
|
459
463
|
</tr>
|
|
@@ -543,6 +547,61 @@ When called without parameters it destroys the most recently created/top most mo
|
|
|
543
547
|
|
|
544
548
|
</tbody>
|
|
545
549
|
</table>
|
|
550
|
+
<table class="table table-sm table-bordered">
|
|
551
|
+
<tbody>
|
|
552
|
+
<tr>
|
|
553
|
+
<td class="col-md-4">
|
|
554
|
+
<a name="environment"></a>
|
|
555
|
+
<span class="name">
|
|
556
|
+
<span class="modifier">Protected</span>
|
|
557
|
+
<span ><b>environment</b></span>
|
|
558
|
+
<a href="#environment"><span class="icon ion-ios-link"></span></a>
|
|
559
|
+
</span>
|
|
560
|
+
</td>
|
|
561
|
+
</tr>
|
|
562
|
+
<tr>
|
|
563
|
+
<td class="col-md-4">
|
|
564
|
+
<i>Type : </i> <code>EnvironmentInjector</code>
|
|
565
|
+
|
|
566
|
+
</td>
|
|
567
|
+
</tr>
|
|
568
|
+
<tr>
|
|
569
|
+
<td class="col-md-4">
|
|
570
|
+
<i>Default value : </i><code>inject(EnvironmentInjector)</code>
|
|
571
|
+
</td>
|
|
572
|
+
</tr>
|
|
573
|
+
<tr>
|
|
574
|
+
<td class="col-md-4">
|
|
575
|
+
<div class="io-line">Inherited from <code><a href="../injectables/BaseModalService.html" target="_self" >BaseModalService</a></code>
|
|
576
|
+
</div>
|
|
577
|
+
</td>
|
|
578
|
+
</tr>
|
|
579
|
+
<tr>
|
|
580
|
+
<td class="col-md-4">
|
|
581
|
+
<div class="io-line">Defined in <code><a href="../injectables/BaseModalService.html#source" target="_self" >BaseModalService:36</a></code>
|
|
582
|
+
</div>
|
|
583
|
+
</td>
|
|
584
|
+
</tr>
|
|
585
|
+
|
|
586
|
+
<tr>
|
|
587
|
+
<td class="col-md-4">
|
|
588
|
+
<div class="io-description"><p>Current module/component injection enviornment
|
|
589
|
+
Allows modules to use providers from calling component</p>
|
|
590
|
+
<p>Root Module/
|
|
591
|
+
└── Lazy loaded Feature Module/
|
|
592
|
+
├── Provides Service & imports modules
|
|
593
|
+
├── Modal component (component that extends base component)
|
|
594
|
+
└── Modal component launcher (dynamically creates modal component)</p>
|
|
595
|
+
<p>Passing EnvironmentInjector in <code>createComponent</code> will look for provider declaration in feature
|
|
596
|
+
module instead of root module. This is required to pass correct context in a lazy-loaded applications.
|
|
597
|
+
Services injected in root, will also be available as feature module enviornment will also hierarchically inherit
|
|
598
|
+
the root services.</p>
|
|
599
|
+
</div>
|
|
600
|
+
</td>
|
|
601
|
+
</tr>
|
|
602
|
+
|
|
603
|
+
</tbody>
|
|
604
|
+
</table>
|
|
546
605
|
<table class="table table-sm table-bordered">
|
|
547
606
|
<tbody>
|
|
548
607
|
<tr>
|
|
@@ -575,7 +634,7 @@ When called without parameters it destroys the most recently created/top most mo
|
|
|
575
634
|
</tr>
|
|
576
635
|
<tr>
|
|
577
636
|
<td class="col-md-4">
|
|
578
|
-
<div class="io-line">Defined in <code><a href="../injectables/BaseModalService.html#source" target="_self" >BaseModalService:
|
|
637
|
+
<div class="io-line">Defined in <code><a href="../injectables/BaseModalService.html#source" target="_self" >BaseModalService:19</a></code>
|
|
579
638
|
</div>
|
|
580
639
|
</td>
|
|
581
640
|
</tr>
|
|
@@ -224,8 +224,8 @@ Also used to insert/remove components from that view.</p>
|
|
|
224
224
|
|
|
225
225
|
<tr>
|
|
226
226
|
<td class="col-md-4">
|
|
227
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
228
|
-
class="link-to-prism">src/placeholder/placeholder.service.ts:
|
|
227
|
+
<div class="io-line">Defined in <a href="" data-line="83"
|
|
228
|
+
class="link-to-prism">src/placeholder/placeholder.service.ts:83</a></div>
|
|
229
229
|
</td>
|
|
230
230
|
</tr>
|
|
231
231
|
|
|
@@ -296,15 +296,15 @@ Also used to insert/remove components from that view.</p>
|
|
|
296
296
|
</tr>
|
|
297
297
|
<tr>
|
|
298
298
|
<td class="col-md-4">
|
|
299
|
-
<code>createComponent(component: ComponentRef<any>, injector: Injector, id?: <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank">any</a
|
|
299
|
+
<code>createComponent(component: ComponentRef<any>, injector: Injector, id?: <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank">any</a>, environment: EnvironmentInjector)</code>
|
|
300
300
|
</td>
|
|
301
301
|
</tr>
|
|
302
302
|
|
|
303
303
|
|
|
304
304
|
<tr>
|
|
305
305
|
<td class="col-md-4">
|
|
306
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
307
|
-
class="link-to-prism">src/placeholder/placeholder.service.ts:
|
|
306
|
+
<div class="io-line">Defined in <a href="" data-line="38"
|
|
307
|
+
class="link-to-prism">src/placeholder/placeholder.service.ts:38</a></div>
|
|
308
308
|
</td>
|
|
309
309
|
</tr>
|
|
310
310
|
|
|
@@ -323,6 +323,7 @@ Also used to insert/remove components from that view.</p>
|
|
|
323
323
|
<td>Name</td>
|
|
324
324
|
<td>Type</td>
|
|
325
325
|
<td>Optional</td>
|
|
326
|
+
<td>Default value</td>
|
|
326
327
|
</tr>
|
|
327
328
|
</thead>
|
|
328
329
|
<tbody>
|
|
@@ -336,6 +337,8 @@ Also used to insert/remove components from that view.</p>
|
|
|
336
337
|
No
|
|
337
338
|
</td>
|
|
338
339
|
|
|
340
|
+
<td>
|
|
341
|
+
</td>
|
|
339
342
|
|
|
340
343
|
</tr>
|
|
341
344
|
<tr>
|
|
@@ -348,6 +351,8 @@ Also used to insert/remove components from that view.</p>
|
|
|
348
351
|
No
|
|
349
352
|
</td>
|
|
350
353
|
|
|
354
|
+
<td>
|
|
355
|
+
</td>
|
|
351
356
|
|
|
352
357
|
</tr>
|
|
353
358
|
<tr>
|
|
@@ -360,6 +365,23 @@ Also used to insert/remove components from that view.</p>
|
|
|
360
365
|
Yes
|
|
361
366
|
</td>
|
|
362
367
|
|
|
368
|
+
<td>
|
|
369
|
+
</td>
|
|
370
|
+
|
|
371
|
+
</tr>
|
|
372
|
+
<tr>
|
|
373
|
+
<td>environment</td>
|
|
374
|
+
<td>
|
|
375
|
+
<code>EnvironmentInjector</code>
|
|
376
|
+
</td>
|
|
377
|
+
|
|
378
|
+
<td>
|
|
379
|
+
No
|
|
380
|
+
</td>
|
|
381
|
+
|
|
382
|
+
<td>
|
|
383
|
+
<code>undefined</code>
|
|
384
|
+
</td>
|
|
363
385
|
|
|
364
386
|
</tr>
|
|
365
387
|
</tbody>
|
|
@@ -396,8 +418,8 @@ Also used to insert/remove components from that view.</p>
|
|
|
396
418
|
|
|
397
419
|
<tr>
|
|
398
420
|
<td class="col-md-4">
|
|
399
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
400
|
-
class="link-to-prism">src/placeholder/placeholder.service.ts:
|
|
421
|
+
<div class="io-line">Defined in <a href="" data-line="64"
|
|
422
|
+
class="link-to-prism">src/placeholder/placeholder.service.ts:64</a></div>
|
|
401
423
|
</td>
|
|
402
424
|
</tr>
|
|
403
425
|
|
|
@@ -463,8 +485,8 @@ Also used to insert/remove components from that view.</p>
|
|
|
463
485
|
|
|
464
486
|
<tr>
|
|
465
487
|
<td class="col-md-4">
|
|
466
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
467
|
-
class="link-to-prism">src/placeholder/placeholder.service.ts:
|
|
488
|
+
<div class="io-line">Defined in <a href="" data-line="68"
|
|
489
|
+
class="link-to-prism">src/placeholder/placeholder.service.ts:68</a></div>
|
|
468
490
|
</td>
|
|
469
491
|
</tr>
|
|
470
492
|
|
|
@@ -542,8 +564,8 @@ Also used to insert/remove components from that view.</p>
|
|
|
542
564
|
|
|
543
565
|
<tr>
|
|
544
566
|
<td class="col-md-4">
|
|
545
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
546
|
-
class="link-to-prism">src/placeholder/placeholder.service.ts:
|
|
567
|
+
<div class="io-line">Defined in <a href="" data-line="97"
|
|
568
|
+
class="link-to-prism">src/placeholder/placeholder.service.ts:97</a></div>
|
|
547
569
|
</td>
|
|
548
570
|
</tr>
|
|
549
571
|
|
|
@@ -621,8 +643,8 @@ Also used to insert/remove components from that view.</p>
|
|
|
621
643
|
|
|
622
644
|
<tr>
|
|
623
645
|
<td class="col-md-4">
|
|
624
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
625
|
-
class="link-to-prism">src/placeholder/placeholder.service.ts:
|
|
646
|
+
<div class="io-line">Defined in <a href="" data-line="76"
|
|
647
|
+
class="link-to-prism">src/placeholder/placeholder.service.ts:76</a></div>
|
|
626
648
|
</td>
|
|
627
649
|
</tr>
|
|
628
650
|
|
|
@@ -688,8 +710,8 @@ Also used to insert/remove components from that view.</p>
|
|
|
688
710
|
|
|
689
711
|
<tr>
|
|
690
712
|
<td class="col-md-4">
|
|
691
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
692
|
-
class="link-to-prism">src/placeholder/placeholder.service.ts:
|
|
713
|
+
<div class="io-line">Defined in <a href="" data-line="27"
|
|
714
|
+
class="link-to-prism">src/placeholder/placeholder.service.ts:27</a></div>
|
|
693
715
|
</td>
|
|
694
716
|
</tr>
|
|
695
717
|
|
|
@@ -769,8 +791,8 @@ Also used to insert/remove components from that view.</p>
|
|
|
769
791
|
|
|
770
792
|
<tr>
|
|
771
793
|
<td class="col-md-4">
|
|
772
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
773
|
-
class="link-to-prism">src/placeholder/placeholder.service.ts:
|
|
794
|
+
<div class="io-line">Defined in <a href="" data-line="90"
|
|
795
|
+
class="link-to-prism">src/placeholder/placeholder.service.ts:90</a></div>
|
|
774
796
|
</td>
|
|
775
797
|
</tr>
|
|
776
798
|
|
|
@@ -859,7 +881,7 @@ Also used to insert/remove components from that view.</p>
|
|
|
859
881
|
</tr>
|
|
860
882
|
<tr>
|
|
861
883
|
<td class="col-md-4">
|
|
862
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
884
|
+
<div class="io-line">Defined in <a href="" data-line="23" class="link-to-prism">src/placeholder/placeholder.service.ts:23</a></div>
|
|
863
885
|
</td>
|
|
864
886
|
</tr>
|
|
865
887
|
|
|
@@ -897,7 +919,7 @@ Also used to insert/remove components from that view.</p>
|
|
|
897
919
|
</tr>
|
|
898
920
|
<tr>
|
|
899
921
|
<td class="col-md-4">
|
|
900
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
922
|
+
<div class="io-line">Defined in <a href="" data-line="19" class="link-to-prism">src/placeholder/placeholder.service.ts:19</a></div>
|
|
901
923
|
</td>
|
|
902
924
|
</tr>
|
|
903
925
|
|
|
@@ -919,7 +941,9 @@ Also used to insert/remove components from that view.</p>
|
|
|
919
941
|
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
|
|
920
942
|
ComponentRef,
|
|
921
943
|
ViewContainerRef,
|
|
922
|
-
Injector
|
|
944
|
+
Injector,
|
|
945
|
+
EnvironmentInjector,
|
|
946
|
+
inject
|
|
923
947
|
} from "@angular/core";
|
|
924
948
|
import { Injectable } from "@angular/core";
|
|
925
949
|
|
|
@@ -951,7 +975,12 @@ export class PlaceholderService {
|
|
|
951
975
|
/**
|
|
952
976
|
* Creates and returns component in the view.
|
|
953
977
|
*/
|
|
954
|
-
createComponent(
|
|
978
|
+
createComponent(
|
|
979
|
+
component: ComponentRef<any>,
|
|
980
|
+
injector: Injector,
|
|
981
|
+
id?: any,
|
|
982
|
+
environment: EnvironmentInjector = undefined
|
|
983
|
+
): ComponentRef<any> {
|
|
955
984
|
if (id) {
|
|
956
985
|
if (!this.viewContainerMap.has(id)) {
|
|
957
986
|
console.error(`No view container with id ${id} found`);
|
|
@@ -963,7 +992,13 @@ export class PlaceholderService {
|
|
|
963
992
|
console.error("No view container defined! Likely due to a missing `cds-placeholder`");
|
|
964
993
|
return;
|
|
965
994
|
}
|
|
966
|
-
return this.viewContainerRef.createComponent(component as any,
|
|
995
|
+
return this.viewContainerRef.createComponent(component as any,
|
|
996
|
+
{
|
|
997
|
+
index: this.viewContainerRef.length,
|
|
998
|
+
injector,
|
|
999
|
+
environmentInjector: environment
|
|
1000
|
+
}
|
|
1001
|
+
);
|
|
967
1002
|
}
|
|
968
1003
|
|
|
969
1004
|
destroyComponent(component: ComponentRef<any>) {
|