@angular/core 12.1.0-next.6 → 12.1.0
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/bundles/core-testing.umd.js +225 -43
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core.umd.js +40 -13
- package/bundles/core.umd.js.map +1 -1
- package/core.d.ts +32 -8
- package/core.metadata.json +1 -1
- package/esm2015/src/application_ref.js +29 -8
- package/esm2015/src/metadata/do_boostrap.js +1 -1
- package/esm2015/src/version.js +1 -1
- package/esm2015/testing/src/r3_test_bed.js +84 -7
- package/esm2015/testing/src/test_bed.js +99 -18
- package/esm2015/testing/src/test_bed_common.js +7 -1
- package/esm2015/testing/src/test_hooks.js +45 -0
- package/esm2015/testing/src/testing.js +3 -3
- package/fesm2015/core.js +30 -9
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +202 -26
- package/fesm2015/testing.js.map +1 -1
- package/package.json +1 -1
- package/src/r3_symbols.d.ts +1 -1
- package/testing/testing.d.ts +63 -5
- package/testing/testing.metadata.json +1 -1
- package/testing.d.ts +1 -1
- package/esm2015/testing/src/before_each.js +0 -33
package/fesm2015/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v12.1.0
|
|
2
|
+
* @license Angular v12.1.0
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -21469,7 +21469,7 @@ class Version {
|
|
|
21469
21469
|
/**
|
|
21470
21470
|
* @publicApi
|
|
21471
21471
|
*/
|
|
21472
|
-
const VERSION = new Version('12.1.0
|
|
21472
|
+
const VERSION = new Version('12.1.0');
|
|
21473
21473
|
|
|
21474
21474
|
/**
|
|
21475
21475
|
* @license
|
|
@@ -29567,20 +29567,41 @@ class ApplicationRef {
|
|
|
29567
29567
|
merge$1(isCurrentlyStable, isStable.pipe(share()));
|
|
29568
29568
|
}
|
|
29569
29569
|
/**
|
|
29570
|
-
* Bootstrap a
|
|
29570
|
+
* Bootstrap a component onto the element identified by its selector or, optionally, to a
|
|
29571
|
+
* specified element.
|
|
29571
29572
|
*
|
|
29572
29573
|
* @usageNotes
|
|
29573
29574
|
* ### Bootstrap process
|
|
29574
29575
|
*
|
|
29575
|
-
* When bootstrapping a
|
|
29576
|
-
*
|
|
29577
|
-
*
|
|
29576
|
+
* When bootstrapping a component, Angular mounts it onto a target DOM element
|
|
29577
|
+
* and kicks off automatic change detection. The target DOM element can be
|
|
29578
|
+
* provided using the `rootSelectorOrNode` argument.
|
|
29578
29579
|
*
|
|
29579
|
-
*
|
|
29580
|
-
*
|
|
29580
|
+
* If the target DOM element is not provided, Angular tries to find one on a page
|
|
29581
|
+
* using the `selector` of the component that is being bootstrapped
|
|
29582
|
+
* (first matched element is used).
|
|
29581
29583
|
*
|
|
29582
29584
|
* ### Example
|
|
29583
|
-
*
|
|
29585
|
+
*
|
|
29586
|
+
* Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
|
|
29587
|
+
* but it requires us to know the component while writing the application code.
|
|
29588
|
+
*
|
|
29589
|
+
* Imagine a situation where we have to wait for an API call to decide about the component to
|
|
29590
|
+
* bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
|
|
29591
|
+
* dynamically bootstrap a component.
|
|
29592
|
+
*
|
|
29593
|
+
* {@example core/ts/platform/platform.ts region='componentSelector'}
|
|
29594
|
+
*
|
|
29595
|
+
* Optionally, a component can be mounted onto a DOM element that does not match the
|
|
29596
|
+
* selector of the bootstrapped component.
|
|
29597
|
+
*
|
|
29598
|
+
* In the following example, we are providing a CSS selector to match the target element.
|
|
29599
|
+
*
|
|
29600
|
+
* {@example core/ts/platform/platform.ts region='cssSelector'}
|
|
29601
|
+
*
|
|
29602
|
+
* While in this example, we are providing reference to a DOM node.
|
|
29603
|
+
*
|
|
29604
|
+
* {@example core/ts/platform/platform.ts region='domNode'}
|
|
29584
29605
|
*/
|
|
29585
29606
|
bootstrap(componentOrFactory, rootSelectorOrNode) {
|
|
29586
29607
|
if (!this._initStatus.done) {
|