@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/core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v12.1.0-next.6
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 new component at the root level of the application.
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 new root component into an application, Angular mounts the
420
- * specified application component onto DOM elements identified by the componentType's
421
- * selector and kicks off automatic change detection to finish initializing the component.
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
- * Optionally, a component can be mounted onto a DOM element that does not match the
424
- * componentType's selector.
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
- * {@example core/ts/platform/platform.ts region='longform'}
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) {