@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/core.d.ts
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
|
*/
|
|
@@ -411,20 +411,41 @@ export declare class ApplicationRef {
|
|
|
411
411
|
*/
|
|
412
412
|
readonly isStable: Observable<boolean>;
|
|
413
413
|
/**
|
|
414
|
-
* Bootstrap a
|
|
414
|
+
* Bootstrap a component onto the element identified by its selector or, optionally, to a
|
|
415
|
+
* specified element.
|
|
415
416
|
*
|
|
416
417
|
* @usageNotes
|
|
417
418
|
* ### Bootstrap process
|
|
418
419
|
*
|
|
419
|
-
* When bootstrapping a
|
|
420
|
-
*
|
|
421
|
-
*
|
|
420
|
+
* When bootstrapping a component, Angular mounts it onto a target DOM element
|
|
421
|
+
* and kicks off automatic change detection. The target DOM element can be
|
|
422
|
+
* provided using the `rootSelectorOrNode` argument.
|
|
422
423
|
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
424
|
+
* If the target DOM element is not provided, Angular tries to find one on a page
|
|
425
|
+
* using the `selector` of the component that is being bootstrapped
|
|
426
|
+
* (first matched element is used).
|
|
425
427
|
*
|
|
426
428
|
* ### Example
|
|
427
|
-
*
|
|
429
|
+
*
|
|
430
|
+
* Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
|
|
431
|
+
* but it requires us to know the component while writing the application code.
|
|
432
|
+
*
|
|
433
|
+
* Imagine a situation where we have to wait for an API call to decide about the component to
|
|
434
|
+
* bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
|
|
435
|
+
* dynamically bootstrap a component.
|
|
436
|
+
*
|
|
437
|
+
* {@example core/ts/platform/platform.ts region='componentSelector'}
|
|
438
|
+
*
|
|
439
|
+
* Optionally, a component can be mounted onto a DOM element that does not match the
|
|
440
|
+
* selector of the bootstrapped component.
|
|
441
|
+
*
|
|
442
|
+
* In the following example, we are providing a CSS selector to match the target element.
|
|
443
|
+
*
|
|
444
|
+
* {@example core/ts/platform/platform.ts region='cssSelector'}
|
|
445
|
+
*
|
|
446
|
+
* While in this example, we are providing reference to a DOM node.
|
|
447
|
+
*
|
|
448
|
+
* {@example core/ts/platform/platform.ts region='domNode'}
|
|
428
449
|
*/
|
|
429
450
|
bootstrap<C>(componentOrFactory: ComponentFactory<C> | Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
|
|
430
451
|
/**
|
|
@@ -2315,6 +2336,9 @@ declare interface DisposableFn {
|
|
|
2315
2336
|
* See ["Bootstrapping"](guide/bootstrapping) and ["Entry components"](guide/entry-components).
|
|
2316
2337
|
*
|
|
2317
2338
|
* @usageNotes
|
|
2339
|
+
* The example below uses `ApplicationRef.bootstrap()` to render the
|
|
2340
|
+
* `AppComponent` on the page.
|
|
2341
|
+
*
|
|
2318
2342
|
* ```typescript
|
|
2319
2343
|
* class AppModule implements DoBootstrap {
|
|
2320
2344
|
* ngDoBootstrap(appRef: ApplicationRef) {
|