@angular/core 6.0.3 → 6.0.7

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.
Files changed (233) hide show
  1. package/bundles/core-testing.umd.js +61 -237
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core-testing.umd.min.js +11 -4
  4. package/bundles/core-testing.umd.min.js.map +1 -1
  5. package/bundles/core.umd.js +591 -2007
  6. package/bundles/core.umd.js.map +1 -1
  7. package/bundles/core.umd.min.js +4 -32
  8. package/bundles/core.umd.min.js.map +1 -1
  9. package/core.metadata.json +1 -1
  10. package/esm2015/core.externs.js +3 -3
  11. package/esm2015/src/application_init.js +2 -9
  12. package/esm2015/src/application_module.js +1 -10
  13. package/esm2015/src/application_ref.js +15 -30
  14. package/esm2015/src/change_detection/change_detector_ref.js +7 -5
  15. package/esm2015/src/change_detection/differs/iterable_differs.js +4 -3
  16. package/esm2015/src/change_detection/differs/keyvalue_differs.js +4 -3
  17. package/esm2015/src/change_detection/pipe_transform.js +3 -6
  18. package/esm2015/src/console.js +0 -11
  19. package/esm2015/src/di/forward_ref.js +8 -6
  20. package/esm2015/src/di/injectable.js +1 -4
  21. package/esm2015/src/di/injection_token.js +6 -8
  22. package/esm2015/src/di/injector.js +5 -10
  23. package/esm2015/src/di/metadata.js +1 -16
  24. package/esm2015/src/di/provider.js +47 -138
  25. package/esm2015/src/di/reflective_errors.js +14 -7
  26. package/esm2015/src/di/reflective_injector.js +22 -24
  27. package/esm2015/src/di/reflective_provider.js +11 -12
  28. package/esm2015/src/error_handler.js +2 -5
  29. package/esm2015/src/event_emitter.js +6 -3
  30. package/esm2015/src/i18n/tokens.js +7 -4
  31. package/esm2015/src/linker/compiler.js +1 -12
  32. package/esm2015/src/linker/query_list.js +4 -4
  33. package/esm2015/src/linker/system_js_ng_module_factory_loader.js +3 -10
  34. package/esm2015/src/linker/view_ref.js +10 -7
  35. package/esm2015/src/metadata/di.js +10 -16
  36. package/esm2015/src/metadata/directives.js +111 -33
  37. package/esm2015/src/metadata/lifecycle_hooks.js +9 -9
  38. package/esm2015/src/metadata/ng_module.js +19 -11
  39. package/esm2015/src/render3/node_manipulation.js +2 -3
  40. package/esm2015/src/render3/view_ref.js +7 -3
  41. package/esm2015/src/testability/testability.js +2 -16
  42. package/esm2015/src/version.js +1 -1
  43. package/esm2015/src/view/ng_module.js +4 -1
  44. package/esm2015/src/zone/ng_zone.js +2 -1
  45. package/esm2015/testing/src/fake_async.js +5 -3
  46. package/esm2015/testing/src/fake_async_fallback.js +5 -3
  47. package/esm2015/testing/src/logger.js +0 -7
  48. package/esm2015/testing/src/metadata_override.js +1 -1
  49. package/esm2015/testing/src/ng_zone_mock.js +0 -7
  50. package/esm2015/testing/src/test_bed.js +1 -34
  51. package/esm2015/testing/src/test_compiler.js +1 -12
  52. package/esm5/index.js +5 -1
  53. package/esm5/public_api.js +6 -1
  54. package/esm5/src/application_init.js +3 -5
  55. package/esm5/src/application_module.js +2 -2
  56. package/esm5/src/application_ref.js +35 -211
  57. package/esm5/src/application_tokens.js +1 -1
  58. package/esm5/src/change_detection/change_detection.js +1 -1
  59. package/esm5/src/change_detection/change_detection_util.js +7 -72
  60. package/esm5/src/change_detection/change_detector_ref.js +1 -1
  61. package/esm5/src/change_detection/constants.js +1 -24
  62. package/esm5/src/change_detection/differs/default_iterable_differ.js +26 -209
  63. package/esm5/src/change_detection/differs/default_keyvalue_differ.js +7 -38
  64. package/esm5/src/change_detection/differs/iterable_differs.js +5 -42
  65. package/esm5/src/change_detection/differs/keyvalue_differs.js +6 -51
  66. package/esm5/src/change_detection/pipe_transform.js +1 -1
  67. package/esm5/src/change_detection.js +6 -1
  68. package/esm5/src/codegen_private_exports.js +1 -1
  69. package/esm5/src/console.js +2 -7
  70. package/esm5/src/core.js +6 -1
  71. package/esm5/src/core_private_export.js +1 -1
  72. package/esm5/src/core_render3_private_export.js +2 -1
  73. package/esm5/src/debug/debug_node.js +3 -15
  74. package/esm5/src/di/defs.js +1 -1
  75. package/esm5/src/di/forward_ref.js +7 -6
  76. package/esm5/src/di/injectable.js +2 -3
  77. package/esm5/src/di/injection_token.js +5 -83
  78. package/esm5/src/di/injector.js +13 -27
  79. package/esm5/src/di/metadata.js +1 -6
  80. package/esm5/src/di/provider.js +1 -1
  81. package/esm5/src/di/r3_injector.js +13 -39
  82. package/esm5/src/di/reflective_errors.js +14 -7
  83. package/esm5/src/di/reflective_injector.js +19 -265
  84. package/esm5/src/di/reflective_key.js +4 -45
  85. package/esm5/src/di/reflective_provider.js +17 -35
  86. package/esm5/src/di/scope.js +1 -1
  87. package/esm5/src/di.js +6 -1
  88. package/esm5/src/error_handler.js +7 -66
  89. package/esm5/src/errors.js +1 -1
  90. package/esm5/src/event_emitter.js +4 -95
  91. package/esm5/src/i18n/tokens.js +9 -49
  92. package/esm5/src/linker/compiler.js +9 -69
  93. package/esm5/src/linker/component_factory.js +2 -18
  94. package/esm5/src/linker/component_factory_resolver.js +1 -1
  95. package/esm5/src/linker/element_ref.js +2 -32
  96. package/esm5/src/linker/ng_module_factory.js +3 -25
  97. package/esm5/src/linker/ng_module_factory_loader.js +2 -10
  98. package/esm5/src/linker/query_list.js +12 -112
  99. package/esm5/src/linker/system_js_ng_module_factory_loader.js +4 -16
  100. package/esm5/src/linker/template_ref.js +2 -26
  101. package/esm5/src/linker/view_container_ref.js +2 -38
  102. package/esm5/src/linker/view_ref.js +10 -115
  103. package/esm5/src/linker.js +2 -1
  104. package/esm5/src/metadata/di.js +7 -25
  105. package/esm5/src/metadata/directives.js +111 -20
  106. package/esm5/src/metadata/lifecycle_hooks.js +1 -1
  107. package/esm5/src/metadata/ng_module.js +14 -9
  108. package/esm5/src/metadata/view.js +1 -20
  109. package/esm5/src/metadata.js +1 -1
  110. package/esm5/src/platform_core_providers.js +1 -1
  111. package/esm5/src/profile/profile.js +1 -1
  112. package/esm5/src/profile/wtf_impl.js +1 -1
  113. package/esm5/src/reflection/platform_reflection_capabilities.js +1 -1
  114. package/esm5/src/reflection/reflection.js +1 -1
  115. package/esm5/src/reflection/reflection_capabilities.js +3 -8
  116. package/esm5/src/reflection/reflector.js +2 -10
  117. package/esm5/src/reflection/types.js +1 -1
  118. package/esm5/src/render/api.js +7 -71
  119. package/esm5/src/render.js +2 -1
  120. package/esm5/src/render3/assert.js +1 -1
  121. package/esm5/src/render3/component.js +6 -5
  122. package/esm5/src/render3/definition.js +6 -8
  123. package/esm5/src/render3/di.js +9 -14
  124. package/esm5/src/render3/errors.js +1 -1
  125. package/esm5/src/render3/hooks.js +2 -2
  126. package/esm5/src/render3/index.js +11 -1
  127. package/esm5/src/render3/instructions.js +52 -38
  128. package/esm5/src/render3/interfaces/container.js +1 -1
  129. package/esm5/src/render3/interfaces/definition.js +1 -1
  130. package/esm5/src/render3/interfaces/injector.js +1 -1
  131. package/esm5/src/render3/interfaces/node.js +1 -1
  132. package/esm5/src/render3/interfaces/projection.js +1 -1
  133. package/esm5/src/render3/interfaces/query.js +1 -1
  134. package/esm5/src/render3/interfaces/renderer.js +1 -3
  135. package/esm5/src/render3/interfaces/view.js +1 -1
  136. package/esm5/src/render3/ng_dev_mode.js +1 -1
  137. package/esm5/src/render3/node_assert.js +1 -1
  138. package/esm5/src/render3/node_manipulation.js +12 -15
  139. package/esm5/src/render3/node_selector_matcher.js +2 -2
  140. package/esm5/src/render3/pipe.js +1 -1
  141. package/esm5/src/render3/pure_function.js +1 -1
  142. package/esm5/src/render3/query.js +11 -59
  143. package/esm5/src/render3/util.js +1 -1
  144. package/esm5/src/render3/view_ref.js +15 -345
  145. package/esm5/src/sanitization/html_sanitizer.js +8 -12
  146. package/esm5/src/sanitization/inert_body.js +8 -72
  147. package/esm5/src/sanitization/sanitization.js +1 -1
  148. package/esm5/src/sanitization/security.js +2 -37
  149. package/esm5/src/sanitization/style_sanitizer.js +1 -1
  150. package/esm5/src/sanitization/url_sanitizer.js +1 -1
  151. package/esm5/src/testability/testability.js +21 -143
  152. package/esm5/src/type.js +1 -1
  153. package/esm5/src/util/decorators.js +1 -1
  154. package/esm5/src/util/lang.js +1 -1
  155. package/esm5/src/util/property.js +1 -1
  156. package/esm5/src/util.js +6 -1
  157. package/esm5/src/version.js +3 -13
  158. package/esm5/src/view/element.js +7 -7
  159. package/esm5/src/view/entrypoint.js +1 -1
  160. package/esm5/src/view/errors.js +1 -1
  161. package/esm5/src/view/index.js +1 -1
  162. package/esm5/src/view/ng_content.js +1 -1
  163. package/esm5/src/view/ng_module.js +4 -1
  164. package/esm5/src/view/provider.js +12 -12
  165. package/esm5/src/view/pure_expression.js +1 -1
  166. package/esm5/src/view/query.js +6 -6
  167. package/esm5/src/view/refs.js +8 -14
  168. package/esm5/src/view/services.js +16 -20
  169. package/esm5/src/view/text.js +1 -1
  170. package/esm5/src/view/types.js +19 -41
  171. package/esm5/src/view/util.js +5 -5
  172. package/esm5/src/view/view.js +4 -6
  173. package/esm5/src/view/view_attach.js +5 -5
  174. package/esm5/src/zone/ng_zone.js +22 -257
  175. package/esm5/src/zone.js +2 -1
  176. package/esm5/testing/index.js +5 -1
  177. package/esm5/testing/public_api.js +6 -1
  178. package/esm5/testing/src/async.js +1 -1
  179. package/esm5/testing/src/async_fallback.js +1 -1
  180. package/esm5/testing/src/async_test_completer.js +2 -8
  181. package/esm5/testing/src/before_each.js +6 -1
  182. package/esm5/testing/src/component_fixture.js +9 -75
  183. package/esm5/testing/src/fake_async.js +12 -3
  184. package/esm5/testing/src/fake_async_fallback.js +5 -3
  185. package/esm5/testing/src/lang_utils.js +1 -1
  186. package/esm5/testing/src/logger.js +1 -1
  187. package/esm5/testing/src/metadata_override.js +1 -1
  188. package/esm5/testing/src/ng_zone_mock.js +1 -1
  189. package/esm5/testing/src/private_export_testing.js +1 -1
  190. package/esm5/testing/src/render3.js +1 -5
  191. package/esm5/testing/src/test_bed.js +20 -172
  192. package/esm5/testing/src/test_compiler.js +5 -43
  193. package/esm5/testing/src/testing.js +6 -1
  194. package/esm5/testing/src/testing_internal.js +3 -9
  195. package/fesm2015/core.js +248 -177
  196. package/fesm2015/core.js.map +1 -1
  197. package/fesm2015/testing.js +9 -13
  198. package/fesm2015/testing.js.map +1 -1
  199. package/fesm5/core.js +591 -2007
  200. package/fesm5/core.js.map +1 -1
  201. package/fesm5/testing.js +61 -237
  202. package/fesm5/testing.js.map +1 -1
  203. package/package.json +1 -1
  204. package/src/application_ref.d.ts +7 -8
  205. package/src/change_detection/change_detector_ref.d.ts +6 -4
  206. package/src/change_detection/differs/iterable_differs.d.ts +3 -2
  207. package/src/change_detection/differs/keyvalue_differs.d.ts +3 -2
  208. package/src/change_detection/pipe_transform.d.ts +2 -5
  209. package/src/di/forward_ref.d.ts +7 -5
  210. package/src/di/injectable.d.ts +4 -14
  211. package/src/di/injection_token.d.ts +5 -7
  212. package/src/di/injector.d.ts +7 -10
  213. package/src/di/metadata.d.ts +13 -86
  214. package/src/di/provider.d.ts +55 -150
  215. package/src/di/reflective_errors.d.ts +13 -6
  216. package/src/di/reflective_injector.d.ts +21 -23
  217. package/src/di/reflective_provider.d.ts +7 -8
  218. package/src/error_handler.d.ts +1 -4
  219. package/src/event_emitter.d.ts +3 -0
  220. package/src/i18n/tokens.d.ts +8 -4
  221. package/src/linker/query_list.d.ts +2 -2
  222. package/src/linker/view_ref.d.ts +9 -6
  223. package/src/metadata/di.d.ts +41 -59
  224. package/src/metadata/directives.d.ts +410 -460
  225. package/src/metadata/lifecycle_hooks.d.ts +8 -8
  226. package/src/metadata/ng_module.d.ts +49 -38
  227. package/src/render3/view_ref.d.ts +6 -2
  228. package/src/zone/ng_zone.d.ts +1 -0
  229. package/testing/src/fake_async.d.ts +4 -2
  230. package/testing/src/fake_async_fallback.d.ts +4 -2
  231. package/testing/src/metadata_override.d.ts +3 -3
  232. package/testing.d.ts +0 -5
  233. package/testing.metadata.json +1 -1
package/fesm5/core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v6.0.3
2
+ * @license Angular v6.0.7
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -95,16 +95,14 @@ function defineInjector(options) {
95
95
  * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As
96
96
  * mentioned above, `'root'` is the default value for `providedIn`.
97
97
  *
98
- * ### Example
99
- *
100
- * #### Tree-shakeable InjectionToken
101
- *
102
- * {@example core/di/ts/injector_spec.ts region='ShakeableInjectionToken'}
103
- *
104
- * #### Plain InjectionToken
98
+ * @usageNotes
99
+ * ### Basic Example
105
100
  *
106
101
  * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
107
102
  *
103
+ * ### Tree-shakeable Example
104
+ *
105
+ * {@example core/di/ts/injector_spec.ts region='ShakeableInjectionToken'}
108
106
  *
109
107
  */
110
108
  var InjectionToken = /** @class */ (function () {
@@ -269,6 +267,7 @@ function makePropDecorator(name, props, parentClass) {
269
267
  * All components that are referenced in the `useValue` value (either directly
270
268
  * or in a nested array or map) will be added to the `entryComponents` property.
271
269
  *
270
+ * @usageNotes
272
271
  * ### Example
273
272
  * The following example shows how the router can populate the `entryComponents`
274
273
  * field of an NgModule based on the router configuration which refers
@@ -301,17 +300,16 @@ var ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents
301
300
  /**
302
301
  * Attribute decorator and metadata.
303
302
  *
304
- *
305
303
  * @Annotation
306
304
  */
307
305
  var Attribute = makeParamDecorator('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });
308
306
  /**
309
307
  * Base class for query metadata.
310
308
  *
311
- * See {@link ContentChildren}, {@link ContentChild}, {@link ViewChildren}, {@link ViewChild} for
312
- * more information.
313
- *
314
- *
309
+ * @see `ContentChildren`.
310
+ * @see `ContentChild`.
311
+ * @see `ViewChildren`.
312
+ * @see `ViewChild`.
315
313
  */
316
314
  var Query = /** @class */ (function () {
317
315
  function Query() {
@@ -341,7 +339,6 @@ var ContentChild = makePropDecorator('ContentChild', function (selector, data) {
341
339
  /**
342
340
  * ViewChildren decorator and metadata.
343
341
  *
344
- *
345
342
  * @Annotation
346
343
  */
347
344
  var ViewChildren = makePropDecorator('ViewChildren', function (selector, data) {
@@ -351,7 +348,6 @@ var ViewChildren = makePropDecorator('ViewChildren', function (selector, data) {
351
348
  /**
352
349
  * ViewChild decorator and metadata.
353
350
  *
354
- *
355
351
  * @Annotation
356
352
  */
357
353
  var ViewChild = makePropDecorator('ViewChild', function (selector, data) {
@@ -365,29 +361,12 @@ var ViewChild = makePropDecorator('ViewChild', function (selector, data) {
365
361
  * Use of this source code is governed by an MIT-style license that can be
366
362
  * found in the LICENSE file at https://angular.io/license
367
363
  */
368
- /**
369
- * @license
370
- * Copyright Google Inc. All Rights Reserved.
371
- *
372
- * Use of this source code is governed by an MIT-style license that can be
373
- * found in the LICENSE file at https://angular.io/license
374
- */
375
- /**
376
- * Describes within the change detector which strategy will be used the next time change
377
- * detection is triggered.
378
- *
379
- */
380
364
  /**
381
365
  * Describes within the change detector which strategy will be used the next time change
382
366
  * detection is triggered.
383
367
  *
384
368
  */
385
369
  var ChangeDetectionStrategy;
386
- /**
387
- * Describes within the change detector which strategy will be used the next time change
388
- * detection is triggered.
389
- *
390
- */
391
370
  (function (ChangeDetectionStrategy) {
392
371
  /**
393
372
  * `OnPush` means that the change detector's mode will be initially set to `CheckOnce`.
@@ -398,16 +377,10 @@ var ChangeDetectionStrategy;
398
377
  */
399
378
  ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
400
379
  })(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
401
- /**
402
- * Describes the status of the detector.
403
- */
404
380
  /**
405
381
  * Describes the status of the detector.
406
382
  */
407
383
  var ChangeDetectorStatus;
408
- /**
409
- * Describes the status of the detector.
410
- */
411
384
  (function (ChangeDetectorStatus) {
412
385
  /**
413
386
  * `CheckOnce` means that after calling detectChanges the mode of the change detector
@@ -453,10 +426,7 @@ function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
453
426
  * found in the LICENSE file at https://angular.io/license
454
427
  */
455
428
  /**
456
- * Directive decorator and metadata.
457
- *
458
- *
459
- * @Annotation
429
+ * Type of the Component metadata.
460
430
  */
461
431
  var Directive = makeDecorator('Directive', function (dir) {
462
432
  if (dir === void 0) { dir = {}; }
@@ -465,6 +435,88 @@ var Directive = makeDecorator('Directive', function (dir) {
465
435
  /**
466
436
  * Component decorator and metadata.
467
437
  *
438
+ * @usageNotes
439
+ *
440
+ * ### Using animations
441
+ *
442
+ * The following snippet shows an animation trigger in a component's
443
+ * metadata. The trigger is attached to an element in the component's
444
+ * template, using "@_trigger_name_", and a state expression that is evaluated
445
+ * at run time to determine whether the animation should start.
446
+ *
447
+ * ```typescript
448
+ * @Component({
449
+ * selector: 'animation-cmp',
450
+ * templateUrl: 'animation-cmp.html',
451
+ * animations: [
452
+ * trigger('myTriggerName', [
453
+ * state('on', style({ opacity: 1 }),
454
+ * state('off', style({ opacity: 0 }),
455
+ * transition('on => off', [
456
+ * animate("1s")
457
+ * ])
458
+ * ])
459
+ * ]
460
+ * })
461
+ * ```
462
+ *
463
+ * ```html
464
+ * <!-- animation-cmp.html -->
465
+ * <div @myTriggerName="expression">...</div>
466
+ * ```
467
+ *
468
+ * ### Preserving whitespace
469
+ *
470
+ * Removing whitespace can greatly reduce AOT-generated code size, and speed up view creation.
471
+ * As of Angular 6, default for `preserveWhitespaces` is false (whitespace is removed).
472
+ * To change the default setting for all components in your application, set
473
+ * the `preserveWhitespaces` option of the AOT compiler.
474
+ *
475
+ * Current implementation removes whitespace characters as follows:
476
+ * - Trims all whitespaces at the beginning and the end of a template.
477
+ * - Removes whitespace-only text nodes. For example,
478
+ * `<button>Action 1</button> <button>Action 2</button>` becomes
479
+ * `<button>Action 1</button><button>Action 2</button>`.
480
+ * - Replaces a series of whitespace characters in text nodes with a single space.
481
+ * For example, `<span>\n some text\n</span>` becomes `<span> some text </span>`.
482
+ * - Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,
483
+ * where whitespace characters are significant.
484
+ *
485
+ * Note that these transformations can influence DOM nodes layout, although impact
486
+ * should be minimal.
487
+ *
488
+ * You can override the default behavior to preserve whitespace characters
489
+ * in certain fragments of a template. For example, you can exclude an entire
490
+ * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:
491
+ *
492
+ * ```html
493
+ * <div ngPreserveWhitespaces>
494
+ * whitespaces are preserved here
495
+ * <span> and here </span>
496
+ * </div>
497
+ * ```
498
+ *
499
+ * You can force a single space to be preserved in a text node by using `&ngsp;`,
500
+ * which is replaced with a space character by Angular's template
501
+ * compiler:
502
+ *
503
+ * ```html
504
+ * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>
505
+ * <!-->compiled to be equivalent to:</>
506
+ * <a>Spaces</a> <a>between</a> <a>links.</a>
507
+ * ```
508
+ *
509
+ * Note that sequences of `&ngsp;` are still collapsed to just one space character when
510
+ * the `preserveWhitespaces` option is set to `false`.
511
+ *
512
+ * ```html
513
+ * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
514
+ * <!-->compiled to be equivalent to:</>
515
+ * <a>Spaces</a> <a>between</a> <a>links.</a>
516
+ * ```
517
+ *
518
+ * To preserve sequences of whitespace characters, use the
519
+ * `ngPreserveWhitespaces` attribute.
468
520
  *
469
521
  * @Annotation
470
522
  */
@@ -473,42 +525,54 @@ var Component = makeDecorator('Component', function (c) {
473
525
  return (__assign({ changeDetection: ChangeDetectionStrategy.Default }, c));
474
526
  }, Directive);
475
527
  /**
476
- * Pipe decorator and metadata.
477
- *
478
- * Use the `@Pipe` annotation to declare that a given class is a pipe. A pipe
479
- * class must also implement {@link PipeTransform} interface.
480
- *
481
- * To use the pipe include a reference to the pipe class in
482
- * {@link NgModule#declarations}.
483
528
  *
484
529
  *
485
530
  * @Annotation
486
531
  */
487
532
  var Pipe = makeDecorator('Pipe', function (p) { return (__assign({ pure: true }, p)); });
488
533
  /**
489
- * Input decorator and metadata.
490
- *
491
534
  *
492
535
  * @Annotation
493
536
  */
494
537
  var Input = makePropDecorator('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
495
538
  /**
496
- * Output decorator and metadata.
497
- *
498
539
  *
499
540
  * @Annotation
500
541
  */
501
542
  var Output = makePropDecorator('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
502
543
  /**
503
- * HostBinding decorator and metadata.
504
- *
505
544
  *
506
545
  * @Annotation
507
546
  */
508
547
  var HostBinding = makePropDecorator('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });
509
548
  /**
510
- * HostListener decorator and metadata.
549
+ * Binds a CSS event to a host listener and supplies configuration metadata.
550
+ * Angular invokes the supplied handler method when the host element emits the specified event,
551
+ * and updates the bound element with the result.
552
+ * If the handler method returns false, applies `preventDefault` on the bound element.
511
553
  *
554
+ * @usageNotes
555
+ *
556
+ * The following example declares a directive
557
+ * that attaches a click listener to a button and counts clicks.
558
+ *
559
+ * ```
560
+ * @Directive({selector: 'button[counting]'})
561
+ * class CountClicks {
562
+ * numberOfClicks = 0;
563
+ *
564
+ * @HostListener('click', ['$event.target'])
565
+ * onClick(btn) {
566
+ * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
567
+ * }
568
+ * }
569
+ *
570
+ * @Component({
571
+ * selector: 'app',
572
+ * template: '<button counting>Increment</button>',
573
+ * })
574
+ * class App {}
575
+ * ```
512
576
  *
513
577
  * @Annotation
514
578
  */
@@ -633,9 +697,7 @@ var ReflectionCapabilities = /** @class */ (function () {
633
697
  return new (t.bind.apply(t, __spread([void 0], args)))();
634
698
  }; };
635
699
  /** @internal */
636
- /** @internal */
637
- ReflectionCapabilities.prototype._zipTypesAndAnnotations = /** @internal */
638
- function (paramTypes, paramAnnotations) {
700
+ ReflectionCapabilities.prototype._zipTypesAndAnnotations = function (paramTypes, paramAnnotations) {
639
701
  var result;
640
702
  if (typeof paramTypes === 'undefined') {
641
703
  result = new Array(paramAnnotations.length);
@@ -809,10 +871,7 @@ var ReflectionCapabilities = /** @class */ (function () {
809
871
  return new Function('o', 'args', functionBody);
810
872
  };
811
873
  // There is not a concept of import uri in Js, but this is useful in developing Dart applications.
812
- // There is not a concept of import uri in Js, but this is useful in developing Dart applications.
813
- ReflectionCapabilities.prototype.importUri =
814
- // There is not a concept of import uri in Js, but this is useful in developing Dart applications.
815
- function (type) {
874
+ ReflectionCapabilities.prototype.importUri = function (type) {
816
875
  // StaticSymbol
817
876
  if (typeof type === 'object' && type['filePath']) {
818
877
  return type['filePath'];
@@ -873,10 +932,10 @@ function getClosureSafeProperty(objWithPropertyToExtract, target) {
873
932
  * Allows to refer to references which are not yet defined.
874
933
  *
875
934
  * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
876
- * DI is declared,
877
- * but not yet defined. It is also used when the `token` which we use when creating a query is not
878
- * yet defined.
935
+ * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
936
+ * a query is not yet defined.
879
937
  *
938
+ * @usageNotes
880
939
  * ### Example
881
940
  * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
882
941
  * @experimental
@@ -891,11 +950,12 @@ function forwardRef(forwardRefFn) {
891
950
  *
892
951
  * Acts as the identity function when given a non-forward-ref value.
893
952
  *
894
- * ### Example ([live demo](http://plnkr.co/edit/GU72mJrk1fiodChcmiDR?p=preview))
953
+ * @usageNotes
954
+ * ### Example
895
955
  *
896
956
  * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
897
957
  *
898
- * See: {@link forwardRef}
958
+ * @see `forwardRef`
899
959
  * @experimental
900
960
  */
901
961
  function resolveForwardRef(type) {
@@ -918,35 +978,30 @@ function resolveForwardRef(type) {
918
978
  /**
919
979
  * Inject decorator and metadata.
920
980
  *
921
- *
922
981
  * @Annotation
923
982
  */
924
983
  var Inject = makeParamDecorator('Inject', function (token) { return ({ token: token }); });
925
984
  /**
926
985
  * Optional decorator and metadata.
927
986
  *
928
- *
929
987
  * @Annotation
930
988
  */
931
989
  var Optional = makeParamDecorator('Optional');
932
990
  /**
933
991
  * Self decorator and metadata.
934
992
  *
935
- *
936
993
  * @Annotation
937
994
  */
938
995
  var Self = makeParamDecorator('Self');
939
996
  /**
940
997
  * SkipSelf decorator and metadata.
941
998
  *
942
- *
943
999
  * @Annotation
944
1000
  */
945
1001
  var SkipSelf = makeParamDecorator('SkipSelf');
946
1002
  /**
947
1003
  * Host decorator and metadata.
948
1004
  *
949
- *
950
1005
  * @Annotation
951
1006
  */
952
1007
  var Host = makeParamDecorator('Host');
@@ -983,23 +1038,17 @@ var NullInjector = /** @class */ (function () {
983
1038
  return NullInjector;
984
1039
  }());
985
1040
  /**
986
- * @usageNotes
987
- * ```
988
- * const injector: Injector = ...;
989
- * injector.get(...);
990
- * ```
991
- *
992
- * @description
993
- *
994
1041
  * Concrete injectors implement this interface.
995
1042
  *
996
- * For more details, see the {@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
1043
+ * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
997
1044
  *
1045
+ * @usageNotes
998
1046
  * ### Example
999
1047
  *
1000
1048
  * {@example core/di/ts/injector_spec.ts region='Injector'}
1001
1049
  *
1002
1050
  * `Injector` returns itself when given `Injector` as a token:
1051
+ *
1003
1052
  * {@example core/di/ts/injector_spec.ts region='injectInjector'}
1004
1053
  *
1005
1054
  *
@@ -1010,25 +1059,12 @@ var Injector = /** @class */ (function () {
1010
1059
  /**
1011
1060
  * Create a new Injector which is configure using `StaticProvider`s.
1012
1061
  *
1062
+ * @usageNotes
1013
1063
  * ### Example
1014
1064
  *
1015
1065
  * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
1016
1066
  */
1017
- /**
1018
- * Create a new Injector which is configure using `StaticProvider`s.
1019
- *
1020
- * ### Example
1021
- *
1022
- * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
1023
- */
1024
- Injector.create = /**
1025
- * Create a new Injector which is configure using `StaticProvider`s.
1026
- *
1027
- * ### Example
1028
- *
1029
- * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
1030
- */
1031
- function (options, parent) {
1067
+ Injector.create = function (options, parent) {
1032
1068
  if (Array.isArray(options)) {
1033
1069
  return new StaticInjector(options, parent);
1034
1070
  }
@@ -1219,7 +1255,12 @@ function resolveToken(token, record, records, parent, notFoundValue, flags) {
1219
1255
  var childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined;
1220
1256
  deps.push(tryResolveToken(
1221
1257
  // Current Token to resolve
1222
- depRecord.token, childRecord, records,
1258
+ depRecord.token,
1259
+ // A record which describes how to resolve the token.
1260
+ // If undefined, this means we don't have such a record
1261
+ childRecord,
1262
+ // Other records we know about.
1263
+ records,
1223
1264
  // If we don't know how to resolve dependency and we should not check parent for it,
1224
1265
  // than pass in Null injector.
1225
1266
  !childRecord && !(options & 4 /* CheckParent */) ? NULL_INJECTOR : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, 0 /* Default */));
@@ -1362,7 +1403,7 @@ function injectArgs(types) {
1362
1403
  type = meta;
1363
1404
  }
1364
1405
  }
1365
- args.push(inject((type), flags));
1406
+ args.push(inject(type, flags));
1366
1407
  }
1367
1408
  else {
1368
1409
  args.push(inject(arg));
@@ -1419,13 +1460,12 @@ function convertInjectableProviderToFactory(type, provider) {
1419
1460
  var reflectionCapabilities = new ReflectionCapabilities();
1420
1461
  deps_3 = reflectionCapabilities.parameters(type);
1421
1462
  }
1422
- return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs((deps_3)))))(); };
1463
+ return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs(deps_3))))(); };
1423
1464
  }
1424
1465
  }
1425
1466
  /**
1426
1467
  * Injectable decorator and metadata.
1427
1468
  *
1428
- *
1429
1469
  * @Annotation
1430
1470
  */
1431
1471
  var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, function (injectableType, options) {
@@ -1446,10 +1486,10 @@ var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, fu
1446
1486
  * found in the LICENSE file at https://angular.io/license
1447
1487
  */
1448
1488
  /**
1449
- * Defines a schema that will allow:
1450
- * - any non-Angular elements with a `-` in their name,
1451
- * - any properties on elements with a `-` in their name which is the common rule for custom
1452
- * elements.
1489
+ * Defines a schema that allows an NgModule to contain the following:
1490
+ * - Non-Angular elements named with dash case (`-`).
1491
+ * - Element properties named with dash case (`-`).
1492
+ * Dash case is the naming convention for custom elements.
1453
1493
  *
1454
1494
  *
1455
1495
  */
@@ -1457,7 +1497,7 @@ var CUSTOM_ELEMENTS_SCHEMA = {
1457
1497
  name: 'custom-elements'
1458
1498
  };
1459
1499
  /**
1460
- * Defines a schema that will allow any property on any element.
1500
+ * Defines a schema that allows any property on any element.
1461
1501
  *
1462
1502
  * @experimental
1463
1503
  */
@@ -1465,12 +1505,17 @@ var NO_ERRORS_SCHEMA = {
1465
1505
  name: 'no-errors-schema'
1466
1506
  };
1467
1507
  /**
1468
- * NgModule decorator and metadata.
1469
- *
1508
+ * Decorator that marks the following class as an NgModule, and supplies
1509
+ * configuration metadata for it.
1470
1510
  *
1471
1511
  * @Annotation
1472
1512
  */
1473
- var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined, function (moduleType, metadata) {
1513
+ var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined,
1514
+ /**
1515
+ * Decorator that marks the following class as an NgModule, and supplies
1516
+ * configuration metadata for it.
1517
+ */
1518
+ function (moduleType, metadata) {
1474
1519
  var imports = (metadata && metadata.imports) || [];
1475
1520
  if (metadata && metadata.exports) {
1476
1521
  imports = __spread(imports, [metadata.exports]);
@@ -1482,13 +1527,6 @@ var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule;
1482
1527
  });
1483
1528
  });
1484
1529
 
1485
- /**
1486
- * @license
1487
- * Copyright Google Inc. All Rights Reserved.
1488
- *
1489
- * Use of this source code is governed by an MIT-style license that can be
1490
- * found in the LICENSE file at https://angular.io/license
1491
- */
1492
1530
  /**
1493
1531
  * @license
1494
1532
  * Copyright Google Inc. All Rights Reserved.
@@ -1502,19 +1540,7 @@ var NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule;
1502
1540
  * See {@link Component#encapsulation encapsulation}.
1503
1541
  *
1504
1542
  */
1505
- /**
1506
- * Defines template and style encapsulation options available for Component's {@link Component}.
1507
- *
1508
- * See {@link Component#encapsulation encapsulation}.
1509
- *
1510
- */
1511
1543
  var ViewEncapsulation;
1512
- /**
1513
- * Defines template and style encapsulation options available for Component's {@link Component}.
1514
- *
1515
- * See {@link Component#encapsulation encapsulation}.
1516
- *
1517
- */
1518
1544
  (function (ViewEncapsulation) {
1519
1545
  /**
1520
1546
  * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
@@ -1567,7 +1593,7 @@ var Version = /** @class */ (function () {
1567
1593
  }
1568
1594
  return Version;
1569
1595
  }());
1570
- var VERSION = new Version('6.0.3');
1596
+ var VERSION = new Version('6.0.7');
1571
1597
 
1572
1598
  /**
1573
1599
  * @license
@@ -1606,14 +1632,13 @@ function defaultErrorLogger(console) {
1606
1632
  * found in the LICENSE file at https://angular.io/license
1607
1633
  */
1608
1634
  /**
1609
- *
1610
- * @description
1611
1635
  * Provides a hook for centralized exception handling.
1612
1636
  *
1613
1637
  * The default implementation of `ErrorHandler` prints error messages to the `console`. To
1614
1638
  * intercept error handling, write a custom exception handler that replaces this default as
1615
1639
  * appropriate for your app.
1616
1640
  *
1641
+ * @usageNotes
1617
1642
  * ### Example
1618
1643
  *
1619
1644
  * ```
@@ -1628,14 +1653,12 @@ function defaultErrorLogger(console) {
1628
1653
  * })
1629
1654
  * class MyModule {}
1630
1655
  * ```
1631
- *
1632
- *
1633
1656
  */
1634
1657
  var ErrorHandler = /** @class */ (function () {
1635
1658
  function ErrorHandler() {
1636
1659
  /**
1637
- * @internal
1638
- */
1660
+ * @internal
1661
+ */
1639
1662
  this._console = console;
1640
1663
  }
1641
1664
  ErrorHandler.prototype.handleError = function (error) {
@@ -1653,9 +1676,7 @@ var ErrorHandler = /** @class */ (function () {
1653
1676
  }
1654
1677
  };
1655
1678
  /** @internal */
1656
- /** @internal */
1657
- ErrorHandler.prototype._findContext = /** @internal */
1658
- function (error) {
1679
+ ErrorHandler.prototype._findContext = function (error) {
1659
1680
  if (error) {
1660
1681
  return getDebugContext(error) ? getDebugContext(error) :
1661
1682
  this._findContext(getOriginalError(error));
@@ -1663,9 +1684,7 @@ var ErrorHandler = /** @class */ (function () {
1663
1684
  return null;
1664
1685
  };
1665
1686
  /** @internal */
1666
- /** @internal */
1667
- ErrorHandler.prototype._findOriginalError = /** @internal */
1668
- function (error) {
1687
+ ErrorHandler.prototype._findOriginalError = function (error) {
1669
1688
  var e = getOriginalError(error);
1670
1689
  while (e && getOriginalError(e)) {
1671
1690
  e = getOriginalError(e);
@@ -1728,7 +1747,8 @@ function addKey(injector, key) {
1728
1747
  * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the
1729
1748
  * {@link Injector} does not have a {@link Provider} for the given key.
1730
1749
  *
1731
- * ### Example ([live demo](http://plnkr.co/edit/vq8D3FRB9aGbnWJqtEPE?p=preview))
1750
+ * @usageNotes
1751
+ * ### Example
1732
1752
  *
1733
1753
  * ```typescript
1734
1754
  * class A {
@@ -1747,7 +1767,8 @@ function noProviderError(injector, key) {
1747
1767
  /**
1748
1768
  * Thrown when dependencies form a cycle.
1749
1769
  *
1750
- * ### Example ([live demo](http://plnkr.co/edit/wYQdNos0Tzql3ei1EV9j?p=info))
1770
+ * @usageNotes
1771
+ * ### Example
1751
1772
  *
1752
1773
  * ```typescript
1753
1774
  * var injector = Injector.resolveAndCreate([
@@ -1771,7 +1792,8 @@ function cyclicDependencyError(injector, key) {
1771
1792
  * The `InstantiationError` class contains the original error plus the dependency graph which caused
1772
1793
  * this object to be instantiated.
1773
1794
  *
1774
- * ### Example ([live demo](http://plnkr.co/edit/7aWYdcqTQsP0eNqEdUAf?p=preview))
1795
+ * @usageNotes
1796
+ * ### Example
1775
1797
  *
1776
1798
  * ```typescript
1777
1799
  * class A {
@@ -1801,7 +1823,8 @@ function instantiationError(injector, originalException, originalStack, key) {
1801
1823
  * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}
1802
1824
  * creation.
1803
1825
  *
1804
- * ### Example ([live demo](http://plnkr.co/edit/YatCFbPAMCL0JSSQ4mvH?p=preview))
1826
+ * @usageNotes
1827
+ * ### Example
1805
1828
  *
1806
1829
  * ```typescript
1807
1830
  * expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError();
@@ -1816,7 +1839,8 @@ function invalidProviderError(provider) {
1816
1839
  * Lack of annotation information prevents the {@link Injector} from determining which dependencies
1817
1840
  * need to be injected into the constructor.
1818
1841
  *
1819
- * ### Example ([live demo](http://plnkr.co/edit/rHnZtlNS7vJOPQ6pcVkm?p=preview))
1842
+ * @usageNotes
1843
+ * ### Example
1820
1844
  *
1821
1845
  * ```typescript
1822
1846
  * class A {
@@ -1858,7 +1882,8 @@ function noAnnotationError(typeOrFunc, params) {
1858
1882
  /**
1859
1883
  * Thrown when getting an object by index.
1860
1884
  *
1861
- * ### Example ([live demo](http://plnkr.co/edit/bRs0SX2OTQiJzqvjgl8P?p=preview))
1885
+ * @usageNotes
1886
+ * ### Example
1862
1887
  *
1863
1888
  * ```typescript
1864
1889
  * class A {}
@@ -1876,6 +1901,7 @@ function outOfBoundsError(index) {
1876
1901
  /**
1877
1902
  * Thrown when a multi provider and a regular provider are bound to the same token.
1878
1903
  *
1904
+ * @usageNotes
1879
1905
  * ### Example
1880
1906
  *
1881
1907
  * ```typescript
@@ -1927,23 +1953,14 @@ var ReflectiveKey = /** @class */ (function () {
1927
1953
  /**
1928
1954
  * Retrieves a `Key` for a token.
1929
1955
  */
1930
- /**
1931
- * Retrieves a `Key` for a token.
1932
- */
1933
- ReflectiveKey.get = /**
1934
- * Retrieves a `Key` for a token.
1935
- */
1936
- function (token) {
1956
+ ReflectiveKey.get = function (token) {
1937
1957
  return _globalKeyRegistry.get(resolveForwardRef(token));
1938
1958
  };
1939
1959
  Object.defineProperty(ReflectiveKey, "numberOfKeys", {
1940
1960
  /**
1941
1961
  * @returns the number of keys registered in the system.
1942
1962
  */
1943
- get: /**
1944
- * @returns the number of keys registered in the system.
1945
- */
1946
- function () { return _globalKeyRegistry.numberOfKeys; },
1963
+ get: function () { return _globalKeyRegistry.numberOfKeys; },
1947
1964
  enumerable: true,
1948
1965
  configurable: true
1949
1966
  });
@@ -2061,17 +2078,18 @@ var ResolvedReflectiveProvider_ = /** @class */ (function () {
2061
2078
  return ResolvedReflectiveProvider_;
2062
2079
  }());
2063
2080
  /**
2064
- * An internal resolved representation of a factory function created by resolving {@link
2065
- * Provider}.
2081
+ * An internal resolved representation of a factory function created by resolving `Provider`.
2066
2082
  * @experimental
2067
2083
  */
2068
2084
  var ResolvedReflectiveFactory = /** @class */ (function () {
2069
- function ResolvedReflectiveFactory(/**
2070
- * Factory function which can return an instance of an object represented by a key.
2071
- */
2072
- factory, /**
2073
- * Arguments (dependencies) to the `factory` function.
2074
- */
2085
+ function ResolvedReflectiveFactory(
2086
+ /**
2087
+ * Factory function which can return an instance of an object represented by a key.
2088
+ */
2089
+ factory,
2090
+ /**
2091
+ * Arguments (dependencies) to the `factory` function.
2092
+ */
2075
2093
  dependencies) {
2076
2094
  this.factory = factory;
2077
2095
  this.dependencies = dependencies;
@@ -2104,10 +2122,10 @@ function resolveReflectiveFactory(provider) {
2104
2122
  return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);
2105
2123
  }
2106
2124
  /**
2107
- * Converts the {@link Provider} into {@link ResolvedProvider}.
2125
+ * Converts the `Provider` into `ResolvedProvider`.
2108
2126
  *
2109
- * {@link Injector} internally only uses {@link ResolvedProvider}, {@link Provider} contains
2110
- * convenience provider syntax.
2127
+ * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider
2128
+ * syntax.
2111
2129
  */
2112
2130
  function resolveReflectiveProvider(provider) {
2113
2131
  return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);
@@ -2122,9 +2140,8 @@ function resolveReflectiveProviders(providers) {
2122
2140
  return Array.from(resolvedProviderMap.values());
2123
2141
  }
2124
2142
  /**
2125
- * Merges a list of ResolvedProviders into a list where
2126
- * each key is contained exactly once and multi providers
2127
- * have been merged.
2143
+ * Merges a list of ResolvedProviders into a list where each key is contained exactly once and
2144
+ * multi providers have been merged.
2128
2145
  */
2129
2146
  function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {
2130
2147
  for (var i = 0; i < providers.length; i++) {
@@ -2252,7 +2269,8 @@ var UNDEFINED = new Object();
2252
2269
  * In typical use, application code asks for the dependencies in the constructor and they are
2253
2270
  * resolved by the `Injector`.
2254
2271
  *
2255
- * ### Example ([live demo](http://plnkr.co/edit/jzjec0?p=preview))
2272
+ * @usageNotes
2273
+ * ### Example
2256
2274
  *
2257
2275
  * The following example creates an `Injector` configured to create `Engine` and `Car`.
2258
2276
  *
@@ -2284,9 +2302,10 @@ var ReflectiveInjector = /** @class */ (function () {
2284
2302
  * Turns an array of provider definitions into an array of resolved providers.
2285
2303
  *
2286
2304
  * A resolution is a process of flattening multiple nested arrays and converting individual
2287
- * providers into an array of {@link ResolvedReflectiveProvider}s.
2305
+ * providers into an array of `ResolvedReflectiveProvider`s.
2288
2306
  *
2289
- * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))
2307
+ * @usageNotes
2308
+ * ### Example
2290
2309
  *
2291
2310
  * ```typescript
2292
2311
  * @Injectable()
@@ -2311,84 +2330,18 @@ var ReflectiveInjector = /** @class */ (function () {
2311
2330
  * });
2312
2331
  * ```
2313
2332
  *
2314
- * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.
2315
2333
  */
2316
- /**
2317
- * Turns an array of provider definitions into an array of resolved providers.
2318
- *
2319
- * A resolution is a process of flattening multiple nested arrays and converting individual
2320
- * providers into an array of {@link ResolvedReflectiveProvider}s.
2321
- *
2322
- * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))
2323
- *
2324
- * ```typescript
2325
- * @Injectable()
2326
- * class Engine {
2327
- * }
2328
- *
2329
- * @Injectable()
2330
- * class Car {
2331
- * constructor(public engine:Engine) {}
2332
- * }
2333
- *
2334
- * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
2335
- *
2336
- * expect(providers.length).toEqual(2);
2337
- *
2338
- * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
2339
- * expect(providers[0].key.displayName).toBe("Car");
2340
- * expect(providers[0].dependencies.length).toEqual(1);
2341
- * expect(providers[0].factory).toBeDefined();
2342
- *
2343
- * expect(providers[1].key.displayName).toBe("Engine");
2344
- * });
2345
- * ```
2346
- *
2347
- * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.
2348
- */
2349
- ReflectiveInjector.resolve = /**
2350
- * Turns an array of provider definitions into an array of resolved providers.
2351
- *
2352
- * A resolution is a process of flattening multiple nested arrays and converting individual
2353
- * providers into an array of {@link ResolvedReflectiveProvider}s.
2354
- *
2355
- * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))
2356
- *
2357
- * ```typescript
2358
- * @Injectable()
2359
- * class Engine {
2360
- * }
2361
- *
2362
- * @Injectable()
2363
- * class Car {
2364
- * constructor(public engine:Engine) {}
2365
- * }
2366
- *
2367
- * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
2368
- *
2369
- * expect(providers.length).toEqual(2);
2370
- *
2371
- * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
2372
- * expect(providers[0].key.displayName).toBe("Car");
2373
- * expect(providers[0].dependencies.length).toEqual(1);
2374
- * expect(providers[0].factory).toBeDefined();
2375
- *
2376
- * expect(providers[1].key.displayName).toBe("Engine");
2377
- * });
2378
- * ```
2379
- *
2380
- * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.
2381
- */
2382
- function (providers) {
2334
+ ReflectiveInjector.resolve = function (providers) {
2383
2335
  return resolveReflectiveProviders(providers);
2384
2336
  };
2385
2337
  /**
2386
2338
  * Resolves an array of providers and creates an injector from those providers.
2387
2339
  *
2388
- * The passed-in providers can be an array of `Type`, {@link Provider},
2340
+ * The passed-in providers can be an array of `Type`, `Provider`,
2389
2341
  * or a recursive array of more providers.
2390
2342
  *
2391
- * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))
2343
+ * @usageNotes
2344
+ * ### Example
2392
2345
  *
2393
2346
  * ```typescript
2394
2347
  * @Injectable()
@@ -2403,67 +2356,8 @@ var ReflectiveInjector = /** @class */ (function () {
2403
2356
  * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
2404
2357
  * expect(injector.get(Car) instanceof Car).toBe(true);
2405
2358
  * ```
2406
- *
2407
- * This function is slower than the corresponding `fromResolvedProviders`
2408
- * because it needs to resolve the passed-in providers first.
2409
- * See {@link ReflectiveInjector#resolve resolve} and
2410
- * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.
2411
2359
  */
2412
- /**
2413
- * Resolves an array of providers and creates an injector from those providers.
2414
- *
2415
- * The passed-in providers can be an array of `Type`, {@link Provider},
2416
- * or a recursive array of more providers.
2417
- *
2418
- * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))
2419
- *
2420
- * ```typescript
2421
- * @Injectable()
2422
- * class Engine {
2423
- * }
2424
- *
2425
- * @Injectable()
2426
- * class Car {
2427
- * constructor(public engine:Engine) {}
2428
- * }
2429
- *
2430
- * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
2431
- * expect(injector.get(Car) instanceof Car).toBe(true);
2432
- * ```
2433
- *
2434
- * This function is slower than the corresponding `fromResolvedProviders`
2435
- * because it needs to resolve the passed-in providers first.
2436
- * See {@link ReflectiveInjector#resolve resolve} and
2437
- * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.
2438
- */
2439
- ReflectiveInjector.resolveAndCreate = /**
2440
- * Resolves an array of providers and creates an injector from those providers.
2441
- *
2442
- * The passed-in providers can be an array of `Type`, {@link Provider},
2443
- * or a recursive array of more providers.
2444
- *
2445
- * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))
2446
- *
2447
- * ```typescript
2448
- * @Injectable()
2449
- * class Engine {
2450
- * }
2451
- *
2452
- * @Injectable()
2453
- * class Car {
2454
- * constructor(public engine:Engine) {}
2455
- * }
2456
- *
2457
- * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
2458
- * expect(injector.get(Car) instanceof Car).toBe(true);
2459
- * ```
2460
- *
2461
- * This function is slower than the corresponding `fromResolvedProviders`
2462
- * because it needs to resolve the passed-in providers first.
2463
- * See {@link ReflectiveInjector#resolve resolve} and
2464
- * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.
2465
- */
2466
- function (providers, parent) {
2360
+ ReflectiveInjector.resolveAndCreate = function (providers, parent) {
2467
2361
  var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);
2468
2362
  return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);
2469
2363
  };
@@ -2472,7 +2366,8 @@ var ReflectiveInjector = /** @class */ (function () {
2472
2366
  *
2473
2367
  * This API is the recommended way to construct injectors in performance-sensitive parts.
2474
2368
  *
2475
- * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))
2369
+ * @usageNotes
2370
+ * ### Example
2476
2371
  *
2477
2372
  * ```typescript
2478
2373
  * @Injectable()
@@ -2490,53 +2385,7 @@ var ReflectiveInjector = /** @class */ (function () {
2490
2385
  * ```
2491
2386
  * @experimental
2492
2387
  */
2493
- /**
2494
- * Creates an injector from previously resolved providers.
2495
- *
2496
- * This API is the recommended way to construct injectors in performance-sensitive parts.
2497
- *
2498
- * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))
2499
- *
2500
- * ```typescript
2501
- * @Injectable()
2502
- * class Engine {
2503
- * }
2504
- *
2505
- * @Injectable()
2506
- * class Car {
2507
- * constructor(public engine:Engine) {}
2508
- * }
2509
- *
2510
- * var providers = ReflectiveInjector.resolve([Car, Engine]);
2511
- * var injector = ReflectiveInjector.fromResolvedProviders(providers);
2512
- * expect(injector.get(Car) instanceof Car).toBe(true);
2513
- * ```
2514
- * @experimental
2515
- */
2516
- ReflectiveInjector.fromResolvedProviders = /**
2517
- * Creates an injector from previously resolved providers.
2518
- *
2519
- * This API is the recommended way to construct injectors in performance-sensitive parts.
2520
- *
2521
- * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))
2522
- *
2523
- * ```typescript
2524
- * @Injectable()
2525
- * class Engine {
2526
- * }
2527
- *
2528
- * @Injectable()
2529
- * class Car {
2530
- * constructor(public engine:Engine) {}
2531
- * }
2532
- *
2533
- * var providers = ReflectiveInjector.resolve([Car, Engine]);
2534
- * var injector = ReflectiveInjector.fromResolvedProviders(providers);
2535
- * expect(injector.get(Car) instanceof Car).toBe(true);
2536
- * ```
2537
- * @experimental
2538
- */
2539
- function (providers, parent) {
2388
+ ReflectiveInjector.fromResolvedProviders = function (providers, parent) {
2540
2389
  return new ReflectiveInjector_(providers, parent);
2541
2390
  };
2542
2391
  return ReflectiveInjector;
@@ -2584,9 +2433,7 @@ var ReflectiveInjector_ = /** @class */ (function () {
2584
2433
  return this._providers[index];
2585
2434
  };
2586
2435
  /** @internal */
2587
- /** @internal */
2588
- ReflectiveInjector_.prototype._new = /** @internal */
2589
- function (provider) {
2436
+ ReflectiveInjector_.prototype._new = function (provider) {
2590
2437
  if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {
2591
2438
  throw cyclicDependencyError(this, provider.key);
2592
2439
  }
@@ -2654,9 +2501,7 @@ var ReflectiveInjector_ = /** @class */ (function () {
2654
2501
  return UNDEFINED;
2655
2502
  };
2656
2503
  /** @internal */
2657
- /** @internal */
2658
- ReflectiveInjector_.prototype._throwOrNull = /** @internal */
2659
- function (key, notFoundValue) {
2504
+ ReflectiveInjector_.prototype._throwOrNull = function (key, notFoundValue) {
2660
2505
  if (notFoundValue !== THROW_IF_NOT_FOUND) {
2661
2506
  return notFoundValue;
2662
2507
  }
@@ -2665,16 +2510,12 @@ var ReflectiveInjector_ = /** @class */ (function () {
2665
2510
  }
2666
2511
  };
2667
2512
  /** @internal */
2668
- /** @internal */
2669
- ReflectiveInjector_.prototype._getByKeySelf = /** @internal */
2670
- function (key, notFoundValue) {
2513
+ ReflectiveInjector_.prototype._getByKeySelf = function (key, notFoundValue) {
2671
2514
  var obj = this._getObjByKeyId(key.id);
2672
2515
  return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);
2673
2516
  };
2674
2517
  /** @internal */
2675
- /** @internal */
2676
- ReflectiveInjector_.prototype._getByKeyDefault = /** @internal */
2677
- function (key, notFoundValue, visibility) {
2518
+ ReflectiveInjector_.prototype._getByKeyDefault = function (key, notFoundValue, visibility) {
2678
2519
  var inj;
2679
2520
  if (visibility instanceof SkipSelf) {
2680
2521
  inj = this.parent;
@@ -2776,20 +2617,20 @@ var R3Injector = /** @class */ (function () {
2776
2617
  var _this = this;
2777
2618
  this.parent = parent;
2778
2619
  /**
2779
- * Map of tokens to records which contain the instances of those tokens.
2780
- */
2620
+ * Map of tokens to records which contain the instances of those tokens.
2621
+ */
2781
2622
  this.records = new Map();
2782
2623
  /**
2783
- * The transitive set of `InjectorType`s which define this injector.
2784
- */
2624
+ * The transitive set of `InjectorType`s which define this injector.
2625
+ */
2785
2626
  this.injectorDefTypes = new Set();
2786
2627
  /**
2787
- * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
2788
- */
2628
+ * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
2629
+ */
2789
2630
  this.onDestroy = new Set();
2790
2631
  /**
2791
- * Flag indicating that this injector was previously destroyed.
2792
- */
2632
+ * Flag indicating that this injector was previously destroyed.
2633
+ */
2793
2634
  this.destroyed = false;
2794
2635
  // Start off by creating Records for every provider declared in every InjectorType
2795
2636
  // included transitively in `def`.
@@ -2808,19 +2649,7 @@ var R3Injector = /** @class */ (function () {
2808
2649
  * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
2809
2650
  * hook was found.
2810
2651
  */
2811
- /**
2812
- * Destroy the injector and release references to every instance or provider associated with it.
2813
- *
2814
- * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
2815
- * hook was found.
2816
- */
2817
- R3Injector.prototype.destroy = /**
2818
- * Destroy the injector and release references to every instance or provider associated with it.
2819
- *
2820
- * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
2821
- * hook was found.
2822
- */
2823
- function () {
2652
+ R3Injector.prototype.destroy = function () {
2824
2653
  this.assertNotDestroyed();
2825
2654
  // Set destroyed = true first, in case lifecycle hooks re-enter destroy().
2826
2655
  this.destroyed = true;
@@ -2883,15 +2712,7 @@ var R3Injector = /** @class */ (function () {
2883
2712
  * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers
2884
2713
  * to this injector.
2885
2714
  */
2886
- /**
2887
- * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers
2888
- * to this injector.
2889
- */
2890
- R3Injector.prototype.processInjectorType = /**
2891
- * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers
2892
- * to this injector.
2893
- */
2894
- function (defOrWrappedDef, parents) {
2715
+ R3Injector.prototype.processInjectorType = function (defOrWrappedDef, parents) {
2895
2716
  var _this = this;
2896
2717
  defOrWrappedDef = resolveForwardRef(defOrWrappedDef);
2897
2718
  // Either the defOrWrappedDef is an InjectorType (with ngInjectorDef) or an
@@ -2949,13 +2770,7 @@ var R3Injector = /** @class */ (function () {
2949
2770
  /**
2950
2771
  * Process a `SingleProvider` and add it.
2951
2772
  */
2952
- /**
2953
- * Process a `SingleProvider` and add it.
2954
- */
2955
- R3Injector.prototype.processProvider = /**
2956
- * Process a `SingleProvider` and add it.
2957
- */
2958
- function (provider) {
2773
+ R3Injector.prototype.processProvider = function (provider) {
2959
2774
  // Determine the token from the provider. Either it's its own token, or has a {provide: ...}
2960
2775
  // property.
2961
2776
  provider = resolveForwardRef(provider);
@@ -2975,7 +2790,7 @@ var R3Injector = /** @class */ (function () {
2975
2790
  else {
2976
2791
  token = provider;
2977
2792
  multiRecord_1 = makeRecord(undefined, NOT_YET, true);
2978
- multiRecord_1.factory = function () { return injectArgs((multiRecord_1.multi)); };
2793
+ multiRecord_1.factory = function () { return injectArgs(multiRecord_1.multi); };
2979
2794
  this.records.set(token, multiRecord_1);
2980
2795
  }
2981
2796
  token = provider;
@@ -3093,6 +2908,11 @@ function couldBeInjectableType(value) {
3093
2908
  * Use of this source code is governed by an MIT-style license that can be
3094
2909
  * found in the LICENSE file at https://angular.io/license
3095
2910
  */
2911
+ /**
2912
+ * @module
2913
+ * @description
2914
+ * The `di` module provides dependency injection container services.
2915
+ */
3096
2916
 
3097
2917
  /**
3098
2918
  * @license
@@ -3146,9 +2966,7 @@ var ApplicationInitStatus = /** @class */ (function () {
3146
2966
  });
3147
2967
  }
3148
2968
  /** @internal */
3149
- /** @internal */
3150
- ApplicationInitStatus.prototype.runInitializers = /** @internal */
3151
- function () {
2969
+ ApplicationInitStatus.prototype.runInitializers = function () {
3152
2970
  var _this = this;
3153
2971
  if (this.initialized) {
3154
2972
  return;
@@ -3177,7 +2995,7 @@ var ApplicationInitStatus = /** @class */ (function () {
3177
2995
  ];
3178
2996
  /** @nocollapse */
3179
2997
  ApplicationInitStatus.ctorParameters = function () { return [
3180
- { type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional },] },
2998
+ { type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional }] }
3181
2999
  ]; };
3182
3000
  return ApplicationInitStatus;
3183
3001
  }());
@@ -3255,18 +3073,13 @@ var Console = /** @class */ (function () {
3255
3073
  console.log(message);
3256
3074
  };
3257
3075
  // Note: for reporting errors use `DOM.logError()` as it is platform specific
3258
- // Note: for reporting errors use `DOM.logError()` as it is platform specific
3259
- Console.prototype.warn =
3260
- // Note: for reporting errors use `DOM.logError()` as it is platform specific
3261
- function (message) {
3076
+ Console.prototype.warn = function (message) {
3262
3077
  // tslint:disable-next-line:no-console
3263
3078
  console.warn(message);
3264
3079
  };
3265
3080
  Console.decorators = [
3266
3081
  { type: Injectable }
3267
3082
  ];
3268
- /** @nocollapse */
3269
- Console.ctorParameters = function () { return []; };
3270
3083
  return Console;
3271
3084
  }());
3272
3085
 
@@ -3309,74 +3122,34 @@ var Compiler = /** @class */ (function () {
3309
3122
  * Compiles the given NgModule and all of its components. All templates of the components listed
3310
3123
  * in `entryComponents` have to be inlined.
3311
3124
  */
3312
- /**
3313
- * Compiles the given NgModule and all of its components. All templates of the components listed
3314
- * in `entryComponents` have to be inlined.
3315
- */
3316
- Compiler.prototype.compileModuleSync = /**
3317
- * Compiles the given NgModule and all of its components. All templates of the components listed
3318
- * in `entryComponents` have to be inlined.
3319
- */
3320
- function (moduleType) { throw _throwError(); };
3125
+ Compiler.prototype.compileModuleSync = function (moduleType) { throw _throwError(); };
3321
3126
  /**
3322
3127
  * Compiles the given NgModule and all of its components
3323
3128
  */
3324
- /**
3325
- * Compiles the given NgModule and all of its components
3326
- */
3327
- Compiler.prototype.compileModuleAsync = /**
3328
- * Compiles the given NgModule and all of its components
3329
- */
3330
- function (moduleType) { throw _throwError(); };
3129
+ Compiler.prototype.compileModuleAsync = function (moduleType) { throw _throwError(); };
3331
3130
  /**
3332
3131
  * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
3333
3132
  */
3334
- /**
3335
- * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
3336
- */
3337
- Compiler.prototype.compileModuleAndAllComponentsSync = /**
3338
- * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
3339
- */
3340
- function (moduleType) {
3133
+ Compiler.prototype.compileModuleAndAllComponentsSync = function (moduleType) {
3341
3134
  throw _throwError();
3342
3135
  };
3343
3136
  /**
3344
3137
  * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
3345
3138
  */
3346
- /**
3347
- * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
3348
- */
3349
- Compiler.prototype.compileModuleAndAllComponentsAsync = /**
3350
- * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
3351
- */
3352
- function (moduleType) {
3139
+ Compiler.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {
3353
3140
  throw _throwError();
3354
3141
  };
3355
3142
  /**
3356
3143
  * Clears all caches.
3357
3144
  */
3358
- /**
3359
- * Clears all caches.
3360
- */
3361
- Compiler.prototype.clearCache = /**
3362
- * Clears all caches.
3363
- */
3364
- function () { };
3145
+ Compiler.prototype.clearCache = function () { };
3365
3146
  /**
3366
3147
  * Clears the cache for the given component/ngModule.
3367
3148
  */
3368
- /**
3369
- * Clears the cache for the given component/ngModule.
3370
- */
3371
- Compiler.prototype.clearCacheFor = /**
3372
- * Clears the cache for the given component/ngModule.
3373
- */
3374
- function (type) { };
3149
+ Compiler.prototype.clearCacheFor = function (type) { };
3375
3150
  Compiler.decorators = [
3376
3151
  { type: Injectable }
3377
3152
  ];
3378
- /** @nocollapse */
3379
- Compiler.ctorParameters = function () { return []; };
3380
3153
  return Compiler;
3381
3154
  }());
3382
3155
  /**
@@ -3642,6 +3415,7 @@ var wtfEndTimeRange = wtfEnabled ? endTimeRange : function (r) { return null; };
3642
3415
  /**
3643
3416
  * Use by directives and components to emit custom Events.
3644
3417
  *
3418
+ * @usageNotes
3645
3419
  * ### Examples
3646
3420
  *
3647
3421
  * In the following example, `Zippy` alternatively emits `open` and `close` events when its
@@ -3680,6 +3454,8 @@ var wtfEndTimeRange = wtfEnabled ? endTimeRange : function (r) { return null; };
3680
3454
  * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
3681
3455
  * ```
3682
3456
  *
3457
+ * ### Notes
3458
+ *
3683
3459
  * Uses Rx.Observable but provides an adapter to make it work as specified here:
3684
3460
  * https://github.com/jhusain/observable-spec
3685
3461
  *
@@ -3760,6 +3536,7 @@ var EventEmitter = /** @class */ (function (_super) {
3760
3536
  * - link to runOutsideAngular/run (throughout this file!)
3761
3537
  * -->
3762
3538
  *
3539
+ * @usageNotes
3763
3540
  * ### Example
3764
3541
  *
3765
3542
  * ```
@@ -3826,28 +3603,28 @@ var NgZone = /** @class */ (function () {
3826
3603
  this.hasPendingMicrotasks = false;
3827
3604
  this.hasPendingMacrotasks = false;
3828
3605
  /**
3829
- * Whether there are no outstanding microtasks or macrotasks.
3830
- */
3606
+ * Whether there are no outstanding microtasks or macrotasks.
3607
+ */
3831
3608
  this.isStable = true;
3832
3609
  /**
3833
- * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
3834
- */
3610
+ * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
3611
+ */
3835
3612
  this.onUnstable = new EventEmitter(false);
3836
3613
  /**
3837
- * Notifies when there is no more microtasks enqueued in the current VM Turn.
3838
- * This is a hint for Angular to do change detection, which may enqueue more microtasks.
3839
- * For this reason this event can fire multiple times per VM Turn.
3840
- */
3614
+ * Notifies when there is no more microtasks enqueued in the current VM Turn.
3615
+ * This is a hint for Angular to do change detection, which may enqueue more microtasks.
3616
+ * For this reason this event can fire multiple times per VM Turn.
3617
+ */
3841
3618
  this.onMicrotaskEmpty = new EventEmitter(false);
3842
3619
  /**
3843
- * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
3844
- * implies we are about to relinquish VM turn.
3845
- * This event gets called just once.
3846
- */
3620
+ * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
3621
+ * implies we are about to relinquish VM turn.
3622
+ * This event gets called just once.
3623
+ */
3847
3624
  this.onStable = new EventEmitter(false);
3848
3625
  /**
3849
- * Notifies that an error has been delivered.
3850
- */
3626
+ * Notifies that an error has been delivered.
3627
+ */
3851
3628
  this.onError = new EventEmitter(false);
3852
3629
  if (typeof Zone == 'undefined') {
3853
3630
  throw new Error("In this configuration Angular requires Zone.js");
@@ -3890,31 +3667,7 @@ var NgZone = /** @class */ (function () {
3890
3667
  *
3891
3668
  * If a synchronous error happens it will be rethrown and not reported via `onError`.
3892
3669
  */
3893
- /**
3894
- * Executes the `fn` function synchronously within the Angular zone and returns value returned by
3895
- * the function.
3896
- *
3897
- * Running functions via `run` allows you to reenter Angular zone from a task that was executed
3898
- * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
3899
- *
3900
- * Any future tasks or microtasks scheduled from within this function will continue executing from
3901
- * within the Angular zone.
3902
- *
3903
- * If a synchronous error happens it will be rethrown and not reported via `onError`.
3904
- */
3905
- NgZone.prototype.run = /**
3906
- * Executes the `fn` function synchronously within the Angular zone and returns value returned by
3907
- * the function.
3908
- *
3909
- * Running functions via `run` allows you to reenter Angular zone from a task that was executed
3910
- * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
3911
- *
3912
- * Any future tasks or microtasks scheduled from within this function will continue executing from
3913
- * within the Angular zone.
3914
- *
3915
- * If a synchronous error happens it will be rethrown and not reported via `onError`.
3916
- */
3917
- function (fn, applyThis, applyArgs) {
3670
+ NgZone.prototype.run = function (fn, applyThis, applyArgs) {
3918
3671
  return this._inner.run(fn, applyThis, applyArgs);
3919
3672
  };
3920
3673
  /**
@@ -3929,31 +3682,7 @@ var NgZone = /** @class */ (function () {
3929
3682
  *
3930
3683
  * If a synchronous error happens it will be rethrown and not reported via `onError`.
3931
3684
  */
3932
- /**
3933
- * Executes the `fn` function synchronously within the Angular zone as a task and returns value
3934
- * returned by the function.
3935
- *
3936
- * Running functions via `run` allows you to reenter Angular zone from a task that was executed
3937
- * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
3938
- *
3939
- * Any future tasks or microtasks scheduled from within this function will continue executing from
3940
- * within the Angular zone.
3941
- *
3942
- * If a synchronous error happens it will be rethrown and not reported via `onError`.
3943
- */
3944
- NgZone.prototype.runTask = /**
3945
- * Executes the `fn` function synchronously within the Angular zone as a task and returns value
3946
- * returned by the function.
3947
- *
3948
- * Running functions via `run` allows you to reenter Angular zone from a task that was executed
3949
- * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
3950
- *
3951
- * Any future tasks or microtasks scheduled from within this function will continue executing from
3952
- * within the Angular zone.
3953
- *
3954
- * If a synchronous error happens it will be rethrown and not reported via `onError`.
3955
- */
3956
- function (fn, applyThis, applyArgs, name) {
3685
+ NgZone.prototype.runTask = function (fn, applyThis, applyArgs, name) {
3957
3686
  var zone = this._inner;
3958
3687
  var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);
3959
3688
  try {
@@ -3967,15 +3696,7 @@ var NgZone = /** @class */ (function () {
3967
3696
  * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
3968
3697
  * rethrown.
3969
3698
  */
3970
- /**
3971
- * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
3972
- * rethrown.
3973
- */
3974
- NgZone.prototype.runGuarded = /**
3975
- * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
3976
- * rethrown.
3977
- */
3978
- function (fn, applyThis, applyArgs) {
3699
+ NgZone.prototype.runGuarded = function (fn, applyThis, applyArgs) {
3979
3700
  return this._inner.runGuarded(fn, applyThis, applyArgs);
3980
3701
  };
3981
3702
  /**
@@ -3991,33 +3712,7 @@ var NgZone = /** @class */ (function () {
3991
3712
  *
3992
3713
  * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
3993
3714
  */
3994
- /**
3995
- * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
3996
- * the function.
3997
- *
3998
- * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
3999
- * work that
4000
- * doesn't trigger Angular change-detection or is subject to Angular's error handling.
4001
- *
4002
- * Any future tasks or microtasks scheduled from within this function will continue executing from
4003
- * outside of the Angular zone.
4004
- *
4005
- * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
4006
- */
4007
- NgZone.prototype.runOutsideAngular = /**
4008
- * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
4009
- * the function.
4010
- *
4011
- * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
4012
- * work that
4013
- * doesn't trigger Angular change-detection or is subject to Angular's error handling.
4014
- *
4015
- * Any future tasks or microtasks scheduled from within this function will continue executing from
4016
- * outside of the Angular zone.
4017
- *
4018
- * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
4019
- */
4020
- function (fn) {
3715
+ NgZone.prototype.runOutsideAngular = function (fn) {
4021
3716
  return this._outer.run(fn);
4022
3717
  };
4023
3718
  return NgZone;
@@ -4138,11 +3833,11 @@ var Testability = /** @class */ (function () {
4138
3833
  this._pendingCount = 0;
4139
3834
  this._isZoneStable = true;
4140
3835
  /**
4141
- * Whether any work was done since the last 'whenStable' callback. This is
4142
- * useful to detect if this could have potentially destabilized another
4143
- * component while it is stabilizing.
4144
- * @internal
4145
- */
3836
+ * Whether any work was done since the last 'whenStable' callback. This is
3837
+ * useful to detect if this could have potentially destabilized another
3838
+ * component while it is stabilizing.
3839
+ * @internal
3840
+ */
4146
3841
  this._didWork = false;
4147
3842
  this._callbacks = [];
4148
3843
  this._watchAngularEvents();
@@ -4172,15 +3867,7 @@ var Testability = /** @class */ (function () {
4172
3867
  * Increases the number of pending request
4173
3868
  * @deprecated pending requests are now tracked with zones.
4174
3869
  */
4175
- /**
4176
- * Increases the number of pending request
4177
- * @deprecated pending requests are now tracked with zones.
4178
- */
4179
- Testability.prototype.increasePendingRequestCount = /**
4180
- * Increases the number of pending request
4181
- * @deprecated pending requests are now tracked with zones.
4182
- */
4183
- function () {
3870
+ Testability.prototype.increasePendingRequestCount = function () {
4184
3871
  this._pendingCount += 1;
4185
3872
  this._didWork = true;
4186
3873
  return this._pendingCount;
@@ -4189,15 +3876,7 @@ var Testability = /** @class */ (function () {
4189
3876
  * Decreases the number of pending request
4190
3877
  * @deprecated pending requests are now tracked with zones
4191
3878
  */
4192
- /**
4193
- * Decreases the number of pending request
4194
- * @deprecated pending requests are now tracked with zones
4195
- */
4196
- Testability.prototype.decreasePendingRequestCount = /**
4197
- * Decreases the number of pending request
4198
- * @deprecated pending requests are now tracked with zones
4199
- */
4200
- function () {
3879
+ Testability.prototype.decreasePendingRequestCount = function () {
4201
3880
  this._pendingCount -= 1;
4202
3881
  if (this._pendingCount < 0) {
4203
3882
  throw new Error('pending async requests below zero');
@@ -4208,13 +3887,7 @@ var Testability = /** @class */ (function () {
4208
3887
  /**
4209
3888
  * Whether an associated application is stable
4210
3889
  */
4211
- /**
4212
- * Whether an associated application is stable
4213
- */
4214
- Testability.prototype.isStable = /**
4215
- * Whether an associated application is stable
4216
- */
4217
- function () {
3890
+ Testability.prototype.isStable = function () {
4218
3891
  return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;
4219
3892
  };
4220
3893
  Testability.prototype._runCallbacksIfReady = function () {
@@ -4223,7 +3896,7 @@ var Testability = /** @class */ (function () {
4223
3896
  // Schedules the call backs in a new frame so that it is always async.
4224
3897
  scheduleMicroTask(function () {
4225
3898
  while (_this._callbacks.length !== 0) {
4226
- var cb = (_this._callbacks.pop());
3899
+ var cb = _this._callbacks.pop();
4227
3900
  clearTimeout(cb.timeoutId);
4228
3901
  cb.doneCb(_this._didWork);
4229
3902
  }
@@ -4284,31 +3957,7 @@ var Testability = /** @class */ (function () {
4284
3957
  * pending macrotasks changes. If this callback returns true doneCb will not be invoked
4285
3958
  * and no further updates will be issued.
4286
3959
  */
4287
- /**
4288
- * Wait for the application to be stable with a timeout. If the timeout is reached before that
4289
- * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
4290
- *
4291
- * @param doneCb The callback to invoke when Angular is stable or the timeout expires
4292
- * whichever comes first.
4293
- * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
4294
- * specified, whenStable() will wait forever.
4295
- * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
4296
- * pending macrotasks changes. If this callback returns true doneCb will not be invoked
4297
- * and no further updates will be issued.
4298
- */
4299
- Testability.prototype.whenStable = /**
4300
- * Wait for the application to be stable with a timeout. If the timeout is reached before that
4301
- * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
4302
- *
4303
- * @param doneCb The callback to invoke when Angular is stable or the timeout expires
4304
- * whichever comes first.
4305
- * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
4306
- * specified, whenStable() will wait forever.
4307
- * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
4308
- * pending macrotasks changes. If this callback returns true doneCb will not be invoked
4309
- * and no further updates will be issued.
4310
- */
4311
- function (doneCb, timeout, updateCb) {
3960
+ Testability.prototype.whenStable = function (doneCb, timeout, updateCb) {
4312
3961
  if (updateCb && !this.taskTrackingZone) {
4313
3962
  throw new Error('Task tracking zone is required when passing an update callback to ' +
4314
3963
  'whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');
@@ -4321,34 +3970,14 @@ var Testability = /** @class */ (function () {
4321
3970
  * Get the number of pending requests
4322
3971
  * @deprecated pending requests are now tracked with zones
4323
3972
  */
4324
- /**
4325
- * Get the number of pending requests
4326
- * @deprecated pending requests are now tracked with zones
4327
- */
4328
- Testability.prototype.getPendingRequestCount = /**
4329
- * Get the number of pending requests
4330
- * @deprecated pending requests are now tracked with zones
4331
- */
4332
- function () { return this._pendingCount; };
3973
+ Testability.prototype.getPendingRequestCount = function () { return this._pendingCount; };
4333
3974
  /**
4334
3975
  * Find providers by name
4335
3976
  * @param using The root element to search from
4336
3977
  * @param provider The name of binding variable
4337
3978
  * @param exactMatch Whether using exactMatch
4338
3979
  */
4339
- /**
4340
- * Find providers by name
4341
- * @param using The root element to search from
4342
- * @param provider The name of binding variable
4343
- * @param exactMatch Whether using exactMatch
4344
- */
4345
- Testability.prototype.findProviders = /**
4346
- * Find providers by name
4347
- * @param using The root element to search from
4348
- * @param provider The name of binding variable
4349
- * @param exactMatch Whether using exactMatch
4350
- */
4351
- function (using, provider, exactMatch) {
3980
+ Testability.prototype.findProviders = function (using, provider, exactMatch) {
4352
3981
  // TODO(juliemr): implement.
4353
3982
  return [];
4354
3983
  };
@@ -4357,7 +3986,7 @@ var Testability = /** @class */ (function () {
4357
3986
  ];
4358
3987
  /** @nocollapse */
4359
3988
  Testability.ctorParameters = function () { return [
4360
- { type: NgZone, },
3989
+ { type: NgZone }
4361
3990
  ]; };
4362
3991
  return Testability;
4363
3992
  }());
@@ -4376,94 +4005,38 @@ var TestabilityRegistry = /** @class */ (function () {
4376
4005
  * @param token token of application, root element
4377
4006
  * @param testability Testability hook
4378
4007
  */
4379
- /**
4380
- * Registers an application with a testability hook so that it can be tracked
4381
- * @param token token of application, root element
4382
- * @param testability Testability hook
4383
- */
4384
- TestabilityRegistry.prototype.registerApplication = /**
4385
- * Registers an application with a testability hook so that it can be tracked
4386
- * @param token token of application, root element
4387
- * @param testability Testability hook
4388
- */
4389
- function (token, testability) {
4008
+ TestabilityRegistry.prototype.registerApplication = function (token, testability) {
4390
4009
  this._applications.set(token, testability);
4391
4010
  };
4392
4011
  /**
4393
4012
  * Unregisters an application.
4394
4013
  * @param token token of application, root element
4395
4014
  */
4396
- /**
4397
- * Unregisters an application.
4398
- * @param token token of application, root element
4399
- */
4400
- TestabilityRegistry.prototype.unregisterApplication = /**
4401
- * Unregisters an application.
4402
- * @param token token of application, root element
4403
- */
4404
- function (token) { this._applications.delete(token); };
4015
+ TestabilityRegistry.prototype.unregisterApplication = function (token) { this._applications.delete(token); };
4405
4016
  /**
4406
4017
  * Unregisters all applications
4407
4018
  */
4408
- /**
4409
- * Unregisters all applications
4410
- */
4411
- TestabilityRegistry.prototype.unregisterAllApplications = /**
4412
- * Unregisters all applications
4413
- */
4414
- function () { this._applications.clear(); };
4019
+ TestabilityRegistry.prototype.unregisterAllApplications = function () { this._applications.clear(); };
4415
4020
  /**
4416
4021
  * Get a testability hook associated with the application
4417
4022
  * @param elem root element
4418
4023
  */
4419
- /**
4420
- * Get a testability hook associated with the application
4421
- * @param elem root element
4422
- */
4423
- TestabilityRegistry.prototype.getTestability = /**
4424
- * Get a testability hook associated with the application
4425
- * @param elem root element
4426
- */
4427
- function (elem) { return this._applications.get(elem) || null; };
4024
+ TestabilityRegistry.prototype.getTestability = function (elem) { return this._applications.get(elem) || null; };
4428
4025
  /**
4429
4026
  * Get all registered testabilities
4430
4027
  */
4431
- /**
4432
- * Get all registered testabilities
4433
- */
4434
- TestabilityRegistry.prototype.getAllTestabilities = /**
4435
- * Get all registered testabilities
4436
- */
4437
- function () { return Array.from(this._applications.values()); };
4028
+ TestabilityRegistry.prototype.getAllTestabilities = function () { return Array.from(this._applications.values()); };
4438
4029
  /**
4439
4030
  * Get all registered applications(root elements)
4440
4031
  */
4441
- /**
4442
- * Get all registered applications(root elements)
4443
- */
4444
- TestabilityRegistry.prototype.getAllRootElements = /**
4445
- * Get all registered applications(root elements)
4446
- */
4447
- function () { return Array.from(this._applications.keys()); };
4032
+ TestabilityRegistry.prototype.getAllRootElements = function () { return Array.from(this._applications.keys()); };
4448
4033
  /**
4449
4034
  * Find testability of a node in the Tree
4450
4035
  * @param elem node
4451
4036
  * @param findInAncestors whether finding testability in ancestors if testability was not found in
4452
4037
  * current node
4453
4038
  */
4454
- /**
4455
- * Find testability of a node in the Tree
4456
- * @param elem node
4457
- * @param findInAncestors whether finding testability in ancestors if testability was not found in
4458
- * current node
4459
- */
4460
- TestabilityRegistry.prototype.findTestabilityInTree = /**
4461
- * Find testability of a node in the Tree
4462
- * @param elem node
4463
- * @param findInAncestors whether finding testability in ancestors if testability was not found in
4464
- * current node
4465
- */
4466
- function (elem, findInAncestors) {
4039
+ TestabilityRegistry.prototype.findTestabilityInTree = function (elem, findInAncestors) {
4467
4040
  if (findInAncestors === void 0) { findInAncestors = true; }
4468
4041
  return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);
4469
4042
  };
@@ -4624,8 +4197,6 @@ function getPlatform() {
4624
4197
  *
4625
4198
  * A page's platform is initialized implicitly when a platform is created via a platform factory
4626
4199
  * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.
4627
- *
4628
- *
4629
4200
  */
4630
4201
  var PlatformRef = /** @class */ (function () {
4631
4202
  /** @internal */
@@ -4639,7 +4210,8 @@ var PlatformRef = /** @class */ (function () {
4639
4210
  * Creates an instance of an `@NgModule` for the given platform
4640
4211
  * for offline compilation.
4641
4212
  *
4642
- * ## Simple Example
4213
+ * @usageNotes
4214
+ * ### Simple Example
4643
4215
  *
4644
4216
  * ```typescript
4645
4217
  * my_module.ts:
@@ -4658,53 +4230,7 @@ var PlatformRef = /** @class */ (function () {
4658
4230
  *
4659
4231
  * @experimental APIs related to application bootstrap are currently under review.
4660
4232
  */
4661
- /**
4662
- * Creates an instance of an `@NgModule` for the given platform
4663
- * for offline compilation.
4664
- *
4665
- * ## Simple Example
4666
- *
4667
- * ```typescript
4668
- * my_module.ts:
4669
- *
4670
- * @NgModule({
4671
- * imports: [BrowserModule]
4672
- * })
4673
- * class MyModule {}
4674
- *
4675
- * main.ts:
4676
- * import {MyModuleNgFactory} from './my_module.ngfactory';
4677
- * import {platformBrowser} from '@angular/platform-browser';
4678
- *
4679
- * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
4680
- * ```
4681
- *
4682
- * @experimental APIs related to application bootstrap are currently under review.
4683
- */
4684
- PlatformRef.prototype.bootstrapModuleFactory = /**
4685
- * Creates an instance of an `@NgModule` for the given platform
4686
- * for offline compilation.
4687
- *
4688
- * ## Simple Example
4689
- *
4690
- * ```typescript
4691
- * my_module.ts:
4692
- *
4693
- * @NgModule({
4694
- * imports: [BrowserModule]
4695
- * })
4696
- * class MyModule {}
4697
- *
4698
- * main.ts:
4699
- * import {MyModuleNgFactory} from './my_module.ngfactory';
4700
- * import {platformBrowser} from '@angular/platform-browser';
4701
- *
4702
- * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
4703
- * ```
4704
- *
4705
- * @experimental APIs related to application bootstrap are currently under review.
4706
- */
4707
- function (moduleFactory, options) {
4233
+ PlatformRef.prototype.bootstrapModuleFactory = function (moduleFactory, options) {
4708
4234
  var _this = this;
4709
4235
  // Note: We need to create the NgZone _before_ we instantiate the module,
4710
4236
  // as instantiating the module creates some providers eagerly.
@@ -4723,10 +4249,8 @@ var PlatformRef = /** @class */ (function () {
4723
4249
  throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');
4724
4250
  }
4725
4251
  moduleRef.onDestroy(function () { return remove(_this._modules, moduleRef); });
4726
- ngZone.runOutsideAngular(function () {
4727
- return ngZone.onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } });
4728
- });
4729
- return _callAndReportToErrorHandler(exceptionHandler, (ngZone), function () {
4252
+ ngZone.runOutsideAngular(function () { return ngZone.onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } }); });
4253
+ return _callAndReportToErrorHandler(exceptionHandler, ngZone, function () {
4730
4254
  var initStatus = moduleRef.injector.get(ApplicationInitStatus);
4731
4255
  initStatus.runInitializers();
4732
4256
  return initStatus.donePromise.then(function () {
@@ -4739,7 +4263,8 @@ var PlatformRef = /** @class */ (function () {
4739
4263
  /**
4740
4264
  * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
4741
4265
  *
4742
- * ## Simple Example
4266
+ * @usageNotes
4267
+ * ### Simple Example
4743
4268
  *
4744
4269
  * ```typescript
4745
4270
  * @NgModule({
@@ -4751,37 +4276,7 @@ var PlatformRef = /** @class */ (function () {
4751
4276
  * ```
4752
4277
  *
4753
4278
  */
4754
- /**
4755
- * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
4756
- *
4757
- * ## Simple Example
4758
- *
4759
- * ```typescript
4760
- * @NgModule({
4761
- * imports: [BrowserModule]
4762
- * })
4763
- * class MyModule {}
4764
- *
4765
- * let moduleRef = platformBrowser().bootstrapModule(MyModule);
4766
- * ```
4767
- *
4768
- */
4769
- PlatformRef.prototype.bootstrapModule = /**
4770
- * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
4771
- *
4772
- * ## Simple Example
4773
- *
4774
- * ```typescript
4775
- * @NgModule({
4776
- * imports: [BrowserModule]
4777
- * })
4778
- * class MyModule {}
4779
- *
4780
- * let moduleRef = platformBrowser().bootstrapModule(MyModule);
4781
- * ```
4782
- *
4783
- */
4784
- function (moduleType, compilerOptions) {
4279
+ PlatformRef.prototype.bootstrapModule = function (moduleType, compilerOptions) {
4785
4280
  var _this = this;
4786
4281
  if (compilerOptions === void 0) { compilerOptions = []; }
4787
4282
  var compilerFactory = this.injector.get(CompilerFactory);
@@ -4807,36 +4302,20 @@ var PlatformRef = /** @class */ (function () {
4807
4302
  /**
4808
4303
  * Register a listener to be called when the platform is disposed.
4809
4304
  */
4810
- /**
4811
- * Register a listener to be called when the platform is disposed.
4812
- */
4813
- PlatformRef.prototype.onDestroy = /**
4814
- * Register a listener to be called when the platform is disposed.
4815
- */
4816
- function (callback) { this._destroyListeners.push(callback); };
4305
+ PlatformRef.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };
4817
4306
  Object.defineProperty(PlatformRef.prototype, "injector", {
4818
4307
  /**
4819
4308
  * Retrieve the platform {@link Injector}, which is the parent injector for
4820
4309
  * every Angular application on the page and provides singleton providers.
4821
4310
  */
4822
- get: /**
4823
- * Retrieve the platform {@link Injector}, which is the parent injector for
4824
- * every Angular application on the page and provides singleton providers.
4825
- */
4826
- function () { return this._injector; },
4311
+ get: function () { return this._injector; },
4827
4312
  enumerable: true,
4828
4313
  configurable: true
4829
4314
  });
4830
4315
  /**
4831
4316
  * Destroy the Angular platform and all Angular applications on the page.
4832
4317
  */
4833
- /**
4834
- * Destroy the Angular platform and all Angular applications on the page.
4835
- */
4836
- PlatformRef.prototype.destroy = /**
4837
- * Destroy the Angular platform and all Angular applications on the page.
4838
- */
4839
- function () {
4318
+ PlatformRef.prototype.destroy = function () {
4840
4319
  if (this._destroyed) {
4841
4320
  throw new Error('The platform has already been destroyed!');
4842
4321
  }
@@ -4854,7 +4333,7 @@ var PlatformRef = /** @class */ (function () {
4854
4333
  ];
4855
4334
  /** @nocollapse */
4856
4335
  PlatformRef.ctorParameters = function () { return [
4857
- { type: Injector, },
4336
+ { type: Injector }
4858
4337
  ]; };
4859
4338
  return PlatformRef;
4860
4339
  }());
@@ -4898,8 +4377,6 @@ function optionsReducer(dst, objs) {
4898
4377
  }
4899
4378
  /**
4900
4379
  * A reference to an Angular application running on a page.
4901
- *
4902
- *
4903
4380
  */
4904
4381
  var ApplicationRef = /** @class */ (function () {
4905
4382
  /** @internal */
@@ -4917,13 +4394,13 @@ var ApplicationRef = /** @class */ (function () {
4917
4394
  this._enforceNoNewChanges = false;
4918
4395
  this._stable = true;
4919
4396
  /**
4920
- * Get a list of component types registered to this application.
4921
- * This list is populated even before the component is created.
4922
- */
4397
+ * Get a list of component types registered to this application.
4398
+ * This list is populated even before the component is created.
4399
+ */
4923
4400
  this.componentTypes = [];
4924
4401
  /**
4925
- * Get a list of components registered to this application.
4926
- */
4402
+ * Get a list of components registered to this application.
4403
+ */
4927
4404
  this.components = [];
4928
4405
  this._enforceNoNewChanges = isDevMode();
4929
4406
  this._zone.onMicrotaskEmpty.subscribe({ next: function () { _this._zone.run(function () { _this.tick(); }); } });
@@ -4971,49 +4448,20 @@ var ApplicationRef = /** @class */ (function () {
4971
4448
  /**
4972
4449
  * Bootstrap a new component at the root level of the application.
4973
4450
  *
4451
+ * @usageNotes
4974
4452
  * ### Bootstrap process
4975
4453
  *
4976
4454
  * When bootstrapping a new root component into an application, Angular mounts the
4977
- * specified application component onto DOM elements identified by the [componentType]'s
4455
+ * specified application component onto DOM elements identified by the componentType's
4978
4456
  * selector and kicks off automatic change detection to finish initializing the component.
4979
4457
  *
4980
4458
  * Optionally, a component can be mounted onto a DOM element that does not match the
4981
- * [componentType]'s selector.
4459
+ * componentType's selector.
4982
4460
  *
4983
4461
  * ### Example
4984
4462
  * {@example core/ts/platform/platform.ts region='longform'}
4985
4463
  */
4986
- /**
4987
- * Bootstrap a new component at the root level of the application.
4988
- *
4989
- * ### Bootstrap process
4990
- *
4991
- * When bootstrapping a new root component into an application, Angular mounts the
4992
- * specified application component onto DOM elements identified by the [componentType]'s
4993
- * selector and kicks off automatic change detection to finish initializing the component.
4994
- *
4995
- * Optionally, a component can be mounted onto a DOM element that does not match the
4996
- * [componentType]'s selector.
4997
- *
4998
- * ### Example
4999
- * {@example core/ts/platform/platform.ts region='longform'}
5000
- */
5001
- ApplicationRef.prototype.bootstrap = /**
5002
- * Bootstrap a new component at the root level of the application.
5003
- *
5004
- * ### Bootstrap process
5005
- *
5006
- * When bootstrapping a new root component into an application, Angular mounts the
5007
- * specified application component onto DOM elements identified by the [componentType]'s
5008
- * selector and kicks off automatic change detection to finish initializing the component.
5009
- *
5010
- * Optionally, a component can be mounted onto a DOM element that does not match the
5011
- * [componentType]'s selector.
5012
- *
5013
- * ### Example
5014
- * {@example core/ts/platform/platform.ts region='longform'}
5015
- */
5016
- function (componentOrFactory, rootSelectorOrNode) {
4464
+ ApplicationRef.prototype.bootstrap = function (componentOrFactory, rootSelectorOrNode) {
5017
4465
  var _this = this;
5018
4466
  if (!this._initStatus.done) {
5019
4467
  throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');
@@ -5024,7 +4472,7 @@ var ApplicationRef = /** @class */ (function () {
5024
4472
  }
5025
4473
  else {
5026
4474
  componentFactory =
5027
- (this._componentFactoryResolver.resolveComponentFactory(componentOrFactory));
4475
+ this._componentFactoryResolver.resolveComponentFactory(componentOrFactory);
5028
4476
  }
5029
4477
  this.componentTypes.push(componentFactory.componentType);
5030
4478
  // Create a factory associated with the current module if it's not bound to some other
@@ -5055,27 +4503,7 @@ var ApplicationRef = /** @class */ (function () {
5055
4503
  * In this case, Angular throws an error, since an Angular application can only have one change
5056
4504
  * detection pass during which all change detection must complete.
5057
4505
  */
5058
- /**
5059
- * Invoke this method to explicitly process change detection and its side-effects.
5060
- *
5061
- * In development mode, `tick()` also performs a second change detection cycle to ensure that no
5062
- * further changes are detected. If additional changes are picked up during this second cycle,
5063
- * bindings in the app have side-effects that cannot be resolved in a single change detection
5064
- * pass.
5065
- * In this case, Angular throws an error, since an Angular application can only have one change
5066
- * detection pass during which all change detection must complete.
5067
- */
5068
- ApplicationRef.prototype.tick = /**
5069
- * Invoke this method to explicitly process change detection and its side-effects.
5070
- *
5071
- * In development mode, `tick()` also performs a second change detection cycle to ensure that no
5072
- * further changes are detected. If additional changes are picked up during this second cycle,
5073
- * bindings in the app have side-effects that cannot be resolved in a single change detection
5074
- * pass.
5075
- * In this case, Angular throws an error, since an Angular application can only have one change
5076
- * detection pass during which all change detection must complete.
5077
- */
5078
- function () {
4506
+ ApplicationRef.prototype.tick = function () {
5079
4507
  var _this = this;
5080
4508
  if (this._runningTick) {
5081
4509
  throw new Error('ApplicationRef.tick is called recursively');
@@ -5102,17 +4530,7 @@ var ApplicationRef = /** @class */ (function () {
5102
4530
  * The view will be automatically detached when it is destroyed.
5103
4531
  * This will throw if the view is already attached to a ViewContainer.
5104
4532
  */
5105
- /**
5106
- * Attaches a view so that it will be dirty checked.
5107
- * The view will be automatically detached when it is destroyed.
5108
- * This will throw if the view is already attached to a ViewContainer.
5109
- */
5110
- ApplicationRef.prototype.attachView = /**
5111
- * Attaches a view so that it will be dirty checked.
5112
- * The view will be automatically detached when it is destroyed.
5113
- * This will throw if the view is already attached to a ViewContainer.
5114
- */
5115
- function (viewRef) {
4533
+ ApplicationRef.prototype.attachView = function (viewRef) {
5116
4534
  var view = viewRef;
5117
4535
  this._views.push(view);
5118
4536
  view.attachToAppRef(this);
@@ -5120,13 +4538,7 @@ var ApplicationRef = /** @class */ (function () {
5120
4538
  /**
5121
4539
  * Detaches a view from dirty checking again.
5122
4540
  */
5123
- /**
5124
- * Detaches a view from dirty checking again.
5125
- */
5126
- ApplicationRef.prototype.detachView = /**
5127
- * Detaches a view from dirty checking again.
5128
- */
5129
- function (viewRef) {
4541
+ ApplicationRef.prototype.detachView = function (viewRef) {
5130
4542
  var view = viewRef;
5131
4543
  remove(this._views, view);
5132
4544
  view.detachFromAppRef();
@@ -5144,9 +4556,7 @@ var ApplicationRef = /** @class */ (function () {
5144
4556
  remove(this.components, componentRef);
5145
4557
  };
5146
4558
  /** @internal */
5147
- /** @internal */
5148
- ApplicationRef.prototype.ngOnDestroy = /** @internal */
5149
- function () {
4559
+ ApplicationRef.prototype.ngOnDestroy = function () {
5150
4560
  // TODO(alxhub): Dispose of the NgZone.
5151
4561
  this._views.slice().forEach(function (view) { return view.destroy(); });
5152
4562
  };
@@ -5154,10 +4564,7 @@ var ApplicationRef = /** @class */ (function () {
5154
4564
  /**
5155
4565
  * Returns the number of attached views.
5156
4566
  */
5157
- get: /**
5158
- * Returns the number of attached views.
5159
- */
5160
- function () { return this._views.length; },
4567
+ get: function () { return this._views.length; },
5161
4568
  enumerable: true,
5162
4569
  configurable: true
5163
4570
  });
@@ -5168,12 +4575,12 @@ var ApplicationRef = /** @class */ (function () {
5168
4575
  ];
5169
4576
  /** @nocollapse */
5170
4577
  ApplicationRef.ctorParameters = function () { return [
5171
- { type: NgZone, },
5172
- { type: Console, },
5173
- { type: Injector, },
5174
- { type: ErrorHandler, },
5175
- { type: ComponentFactoryResolver, },
5176
- { type: ApplicationInitStatus, },
4578
+ { type: NgZone },
4579
+ { type: Console },
4580
+ { type: Injector },
4581
+ { type: ErrorHandler },
4582
+ { type: ComponentFactoryResolver },
4583
+ { type: ApplicationInitStatus }
5177
4584
  ]; };
5178
4585
  return ApplicationRef;
5179
4586
  }());
@@ -5191,6 +4598,7 @@ function remove(list, el) {
5191
4598
  * Use of this source code is governed by an MIT-style license that can be
5192
4599
  * found in the LICENSE file at https://angular.io/license
5193
4600
  */
4601
+ // Public API for Zone
5194
4602
 
5195
4603
  /**
5196
4604
  * @license
@@ -5257,16 +4665,10 @@ var RendererFactory2 = /** @class */ (function () {
5257
4665
  }
5258
4666
  return RendererFactory2;
5259
4667
  }());
5260
- /**
5261
- * @experimental
5262
- */
5263
4668
  /**
5264
4669
  * @experimental
5265
4670
  */
5266
4671
  var RendererStyleFlags2;
5267
- /**
5268
- * @experimental
5269
- */
5270
4672
  (function (RendererStyleFlags2) {
5271
4673
  RendererStyleFlags2[RendererStyleFlags2["Important"] = 1] = "Important";
5272
4674
  RendererStyleFlags2[RendererStyleFlags2["DashCase"] = 2] = "DashCase";
@@ -5287,6 +4689,7 @@ var Renderer2 = /** @class */ (function () {
5287
4689
  * Use of this source code is governed by an MIT-style license that can be
5288
4690
  * found in the LICENSE file at https://angular.io/license
5289
4691
  */
4692
+ // Public API for render
5290
4693
 
5291
4694
  /**
5292
4695
  * @license
@@ -5381,14 +4784,14 @@ function getModuleFactory(id) {
5381
4784
  *
5382
4785
  * NOTE: In the future this class will implement an `Observable` interface.
5383
4786
  *
5384
- * ### Example ([live demo](http://plnkr.co/edit/RX8sJnQYl9FWuSCWme5z?p=preview))
4787
+ * @usageNotes
4788
+ * ### Example
5385
4789
  * ```typescript
5386
4790
  * @Component({...})
5387
4791
  * class Container {
5388
4792
  * @ViewChildren(Item) items:QueryList<Item>;
5389
4793
  * }
5390
4794
  * ```
5391
- *
5392
4795
  */
5393
4796
  var QueryList = /** @class */ (function () {
5394
4797
  function QueryList() {
@@ -5401,86 +4804,38 @@ var QueryList = /** @class */ (function () {
5401
4804
  * See
5402
4805
  * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
5403
4806
  */
5404
- /**
5405
- * See
5406
- * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
5407
- */
5408
- QueryList.prototype.map = /**
5409
- * See
5410
- * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
5411
- */
5412
- function (fn) { return this._results.map(fn); };
4807
+ QueryList.prototype.map = function (fn) { return this._results.map(fn); };
5413
4808
  /**
5414
4809
  * See
5415
4810
  * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
5416
4811
  */
5417
- /**
5418
- * See
5419
- * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
5420
- */
5421
- QueryList.prototype.filter = /**
5422
- * See
5423
- * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
5424
- */
5425
- function (fn) {
4812
+ QueryList.prototype.filter = function (fn) {
5426
4813
  return this._results.filter(fn);
5427
4814
  };
5428
4815
  /**
5429
4816
  * See
5430
4817
  * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
5431
4818
  */
5432
- /**
5433
- * See
5434
- * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
5435
- */
5436
- QueryList.prototype.find = /**
5437
- * See
5438
- * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
5439
- */
5440
- function (fn) {
4819
+ QueryList.prototype.find = function (fn) {
5441
4820
  return this._results.find(fn);
5442
4821
  };
5443
4822
  /**
5444
4823
  * See
5445
4824
  * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
5446
4825
  */
5447
- /**
5448
- * See
5449
- * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
5450
- */
5451
- QueryList.prototype.reduce = /**
5452
- * See
5453
- * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
5454
- */
5455
- function (fn, init) {
4826
+ QueryList.prototype.reduce = function (fn, init) {
5456
4827
  return this._results.reduce(fn, init);
5457
4828
  };
5458
4829
  /**
5459
4830
  * See
5460
4831
  * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
5461
4832
  */
5462
- /**
5463
- * See
5464
- * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
5465
- */
5466
- QueryList.prototype.forEach = /**
5467
- * See
5468
- * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
5469
- */
5470
- function (fn) { this._results.forEach(fn); };
4833
+ QueryList.prototype.forEach = function (fn) { this._results.forEach(fn); };
5471
4834
  /**
5472
4835
  * See
5473
4836
  * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
5474
4837
  */
5475
- /**
5476
- * See
5477
- * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
5478
- */
5479
- QueryList.prototype.some = /**
5480
- * See
5481
- * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
5482
- */
5483
- function (fn) {
4838
+ QueryList.prototype.some = function (fn) {
5484
4839
  return this._results.some(fn);
5485
4840
  };
5486
4841
  QueryList.prototype.toArray = function () { return this._results.slice(); };
@@ -5495,13 +4850,9 @@ var QueryList = /** @class */ (function () {
5495
4850
  };
5496
4851
  QueryList.prototype.notifyOnChanges = function () { this.changes.emit(this); };
5497
4852
  /** internal */
4853
+ QueryList.prototype.setDirty = function () { this.dirty = true; };
5498
4854
  /** internal */
5499
- QueryList.prototype.setDirty = /** internal */
5500
- function () { this.dirty = true; };
5501
- /** internal */
5502
- /** internal */
5503
- QueryList.prototype.destroy = /** internal */
5504
- function () {
4855
+ QueryList.prototype.destroy = function () {
5505
4856
  this.changes.complete();
5506
4857
  this.changes.unsubscribe();
5507
4858
  };
@@ -5578,8 +4929,8 @@ var SystemJsNgModuleLoader = /** @class */ (function () {
5578
4929
  ];
5579
4930
  /** @nocollapse */
5580
4931
  SystemJsNgModuleLoader.ctorParameters = function () { return [
5581
- { type: Compiler, },
5582
- { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional },] },
4932
+ { type: Compiler },
4933
+ { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional }] }
5583
4934
  ]; };
5584
4935
  return SystemJsNgModuleLoader;
5585
4936
  }());
@@ -5682,9 +5033,10 @@ var ViewRef = /** @class */ (function (_super) {
5682
5033
  *
5683
5034
  * Properties of elements in a View can change, but the structure (number and order) of elements in
5684
5035
  * a View cannot. Changing the structure of Elements can only be done by inserting, moving or
5685
- * removing nested Views via a {@link ViewContainerRef}. Each View can contain many View Containers.
5036
+ * removing nested Views via a `ViewContainerRef`. Each View can contain many View Containers.
5686
5037
  * <!-- /TODO -->
5687
5038
  *
5039
+ * @usageNotes
5688
5040
  * ### Example
5689
5041
  *
5690
5042
  * Given this template...
@@ -5696,9 +5048,10 @@ var ViewRef = /** @class */ (function (_super) {
5696
5048
  * </ul>
5697
5049
  * ```
5698
5050
  *
5699
- * We have two {@link TemplateRef}s:
5051
+ * We have two `TemplateRef`s:
5052
+ *
5053
+ * Outer `TemplateRef`:
5700
5054
  *
5701
- * Outer {@link TemplateRef}:
5702
5055
  * ```
5703
5056
  * Count: {{items.length}}
5704
5057
  * <ul>
@@ -5706,14 +5059,15 @@ var ViewRef = /** @class */ (function (_super) {
5706
5059
  * </ul>
5707
5060
  * ```
5708
5061
  *
5709
- * Inner {@link TemplateRef}:
5062
+ * Inner `TemplateRef`:
5063
+ *
5710
5064
  * ```
5711
5065
  * <li>{{item}}</li>
5712
5066
  * ```
5713
5067
  *
5714
- * Notice that the original template is broken down into two separate {@link TemplateRef}s.
5068
+ * Notice that the original template is broken down into two separate `TemplateRef`s.
5715
5069
  *
5716
- * The outer/inner {@link TemplateRef}s are then assembled into views like so:
5070
+ * The outer/inner `TemplateRef`s are then assembled into views like so:
5717
5071
  *
5718
5072
  * ```
5719
5073
  * <!-- ViewRef: outer-0 -->
@@ -5742,6 +5096,7 @@ var EmbeddedViewRef = /** @class */ (function (_super) {
5742
5096
  * Use of this source code is governed by an MIT-style license that can be
5743
5097
  * found in the LICENSE file at https://angular.io/license
5744
5098
  */
5099
+ // Public API for compiler
5745
5100
 
5746
5101
  /**
5747
5102
  * @license
@@ -5976,26 +5331,14 @@ var WrappedValue = /** @class */ (function () {
5976
5331
  this.wrapped = value;
5977
5332
  }
5978
5333
  /** Creates a wrapped value. */
5979
- /** Creates a wrapped value. */
5980
- WrappedValue.wrap = /** Creates a wrapped value. */
5981
- function (value) { return new WrappedValue(value); };
5334
+ WrappedValue.wrap = function (value) { return new WrappedValue(value); };
5982
5335
  /**
5983
5336
  * Returns the underlying value of a wrapped value.
5984
5337
  * Returns the given `value` when it is not wrapped.
5985
5338
  **/
5986
- /**
5987
- * Returns the underlying value of a wrapped value.
5988
- * Returns the given `value` when it is not wrapped.
5989
- **/
5990
- WrappedValue.unwrap = /**
5991
- * Returns the underlying value of a wrapped value.
5992
- * Returns the given `value` when it is not wrapped.
5993
- **/
5994
- function (value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; };
5339
+ WrappedValue.unwrap = function (value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; };
5995
5340
  /** Returns true if `value` is a wrapped value. */
5996
- /** Returns true if `value` is a wrapped value. */
5997
- WrappedValue.isWrapped = /** Returns true if `value` is a wrapped value. */
5998
- function (value) { return value instanceof WrappedValue; };
5341
+ WrappedValue.isWrapped = function (value) { return value instanceof WrappedValue; };
5999
5342
  return WrappedValue;
6000
5343
  }());
6001
5344
  /**
@@ -6011,13 +5354,7 @@ var SimpleChange = /** @class */ (function () {
6011
5354
  /**
6012
5355
  * Check whether the new value is the first value assigned.
6013
5356
  */
6014
- /**
6015
- * Check whether the new value is the first value assigned.
6016
- */
6017
- SimpleChange.prototype.isFirstChange = /**
6018
- * Check whether the new value is the first value assigned.
6019
- */
6020
- function () { return this.firstChange; };
5357
+ SimpleChange.prototype.isFirstChange = function () { return this.firstChange; };
6021
5358
  return SimpleChange;
6022
5359
  }());
6023
5360
  function isListLikeIterable(obj) {
@@ -6025,7 +5362,6 @@ function isListLikeIterable(obj) {
6025
5362
  return false;
6026
5363
  return Array.isArray(obj) ||
6027
5364
  (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]
6028
- // JS Map are iterables but return entries as [k, v]
6029
5365
  getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop
6030
5366
  }
6031
5367
  function areIterablesEqual(a, b, comparator) {
@@ -6117,7 +5453,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
6117
5453
  // Order: remove, add, move
6118
5454
  var record = !nextRemove ||
6119
5455
  nextIt &&
6120
- (nextIt.currentIndex) <
5456
+ nextIt.currentIndex <
6121
5457
  getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?
6122
5458
  nextIt :
6123
5459
  nextRemove;
@@ -6138,7 +5474,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
6138
5474
  if (!moveOffsets)
6139
5475
  moveOffsets = [];
6140
5476
  var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
6141
- var localCurrentIndex = (currentIndex) - addRemoveOffset;
5477
+ var localCurrentIndex = currentIndex - addRemoveOffset;
6142
5478
  if (localMovePreviousIndex != localCurrentIndex) {
6143
5479
  for (var i = 0; i < localMovePreviousIndex; i++) {
6144
5480
  var offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);
@@ -6258,10 +5594,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
6258
5594
  /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity
6259
5595
  * changes.
6260
5596
  */
6261
- get: /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity
6262
- * changes.
6263
- */
6264
- function () {
5597
+ get: function () {
6265
5598
  return this._additionsHead !== null || this._movesHead !== null ||
6266
5599
  this._removalsHead !== null || this._identityChangesHead !== null;
6267
5600
  },
@@ -6276,23 +5609,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
6276
5609
  *
6277
5610
  * @internal
6278
5611
  */
6279
- /**
6280
- * Reset the state of the change objects to show no changes. This means set previousKey to
6281
- * currentKey, and clear all of the queues (additions, moves, removals).
6282
- * Set the previousIndexes of moved and added items to their currentIndexes
6283
- * Reset the list of additions, moves and removals
6284
- *
6285
- * @internal
6286
- */
6287
- DefaultIterableDiffer.prototype._reset = /**
6288
- * Reset the state of the change objects to show no changes. This means set previousKey to
6289
- * currentKey, and clear all of the queues (additions, moves, removals).
6290
- * Set the previousIndexes of moved and added items to their currentIndexes
6291
- * Reset the list of additions, moves and removals
6292
- *
6293
- * @internal
6294
- */
6295
- function () {
5612
+ DefaultIterableDiffer.prototype._reset = function () {
6296
5613
  if (this.isDirty) {
6297
5614
  var record = void 0;
6298
5615
  var nextRecord = void 0;
@@ -6324,27 +5641,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
6324
5641
  *
6325
5642
  * @internal
6326
5643
  */
6327
- /**
6328
- * This is the core function which handles differences between collections.
6329
- *
6330
- * - `record` is the record which we saw at this position last time. If null then it is a new
6331
- * item.
6332
- * - `item` is the current item in the collection
6333
- * - `index` is the position of the item in the collection
6334
- *
6335
- * @internal
6336
- */
6337
- DefaultIterableDiffer.prototype._mismatch = /**
6338
- * This is the core function which handles differences between collections.
6339
- *
6340
- * - `record` is the record which we saw at this position last time. If null then it is a new
6341
- * item.
6342
- * - `item` is the current item in the collection
6343
- * - `index` is the position of the item in the collection
6344
- *
6345
- * @internal
6346
- */
6347
- function (record, item, itemTrackBy, index) {
5644
+ DefaultIterableDiffer.prototype._mismatch = function (record, item, itemTrackBy, index) {
6348
5645
  // The previous record after which we will append the current one.
6349
5646
  var previousRecord;
6350
5647
  if (record === null) {
@@ -6409,64 +5706,10 @@ var DefaultIterableDiffer = /** @class */ (function () {
6409
5706
  *
6410
5707
  * @internal
6411
5708
  */
6412
- /**
6413
- * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)
6414
- *
6415
- * Use case: `[a, a]` => `[b, a, a]`
6416
- *
6417
- * If we did not have this check then the insertion of `b` would:
6418
- * 1) evict first `a`
6419
- * 2) insert `b` at `0` index.
6420
- * 3) leave `a` at index `1` as is. <-- this is wrong!
6421
- * 3) reinsert `a` at index 2. <-- this is wrong!
6422
- *
6423
- * The correct behavior is:
6424
- * 1) evict first `a`
6425
- * 2) insert `b` at `0` index.
6426
- * 3) reinsert `a` at index 1.
6427
- * 3) move `a` at from `1` to `2`.
6428
- *
6429
- *
6430
- * Double check that we have not evicted a duplicate item. We need to check if the item type may
6431
- * have already been removed:
6432
- * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted
6433
- * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a
6434
- * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'
6435
- * at the end.
6436
- *
6437
- * @internal
6438
- */
6439
- DefaultIterableDiffer.prototype._verifyReinsertion = /**
6440
- * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)
6441
- *
6442
- * Use case: `[a, a]` => `[b, a, a]`
6443
- *
6444
- * If we did not have this check then the insertion of `b` would:
6445
- * 1) evict first `a`
6446
- * 2) insert `b` at `0` index.
6447
- * 3) leave `a` at index `1` as is. <-- this is wrong!
6448
- * 3) reinsert `a` at index 2. <-- this is wrong!
6449
- *
6450
- * The correct behavior is:
6451
- * 1) evict first `a`
6452
- * 2) insert `b` at `0` index.
6453
- * 3) reinsert `a` at index 1.
6454
- * 3) move `a` at from `1` to `2`.
6455
- *
6456
- *
6457
- * Double check that we have not evicted a duplicate item. We need to check if the item type may
6458
- * have already been removed:
6459
- * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted
6460
- * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a
6461
- * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'
6462
- * at the end.
6463
- *
6464
- * @internal
6465
- */
6466
- function (record, item, itemTrackBy, index) {
5709
+ DefaultIterableDiffer.prototype._verifyReinsertion = function (record, item, itemTrackBy, index) {
6467
5710
  var reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
6468
5711
  if (reinsertRecord !== null) {
6469
- record = this._reinsertAfter(reinsertRecord, (record._prev), index);
5712
+ record = this._reinsertAfter(reinsertRecord, record._prev, index);
6470
5713
  }
6471
5714
  else if (record.currentIndex != index) {
6472
5715
  record.currentIndex = index;
@@ -6481,21 +5724,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
6481
5724
  *
6482
5725
  * @internal
6483
5726
  */
6484
- /**
6485
- * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection
6486
- *
6487
- * - `record` The first excess {@link IterableChangeRecord_}.
6488
- *
6489
- * @internal
6490
- */
6491
- DefaultIterableDiffer.prototype._truncate = /**
6492
- * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection
6493
- *
6494
- * - `record` The first excess {@link IterableChangeRecord_}.
6495
- *
6496
- * @internal
6497
- */
6498
- function (record) {
5727
+ DefaultIterableDiffer.prototype._truncate = function (record) {
6499
5728
  // Anything after that needs to be removed;
6500
5729
  while (record !== null) {
6501
5730
  var nextRecord = record._next;
@@ -6522,9 +5751,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
6522
5751
  }
6523
5752
  };
6524
5753
  /** @internal */
6525
- /** @internal */
6526
- DefaultIterableDiffer.prototype._reinsertAfter = /** @internal */
6527
- function (record, prevRecord, index) {
5754
+ DefaultIterableDiffer.prototype._reinsertAfter = function (record, prevRecord, index) {
6528
5755
  if (this._unlinkedRecords !== null) {
6529
5756
  this._unlinkedRecords.remove(record);
6530
5757
  }
@@ -6547,18 +5774,14 @@ var DefaultIterableDiffer = /** @class */ (function () {
6547
5774
  return record;
6548
5775
  };
6549
5776
  /** @internal */
6550
- /** @internal */
6551
- DefaultIterableDiffer.prototype._moveAfter = /** @internal */
6552
- function (record, prevRecord, index) {
5777
+ DefaultIterableDiffer.prototype._moveAfter = function (record, prevRecord, index) {
6553
5778
  this._unlink(record);
6554
5779
  this._insertAfter(record, prevRecord, index);
6555
5780
  this._addToMoves(record, index);
6556
5781
  return record;
6557
5782
  };
6558
5783
  /** @internal */
6559
- /** @internal */
6560
- DefaultIterableDiffer.prototype._addAfter = /** @internal */
6561
- function (record, prevRecord, index) {
5784
+ DefaultIterableDiffer.prototype._addAfter = function (record, prevRecord, index) {
6562
5785
  this._insertAfter(record, prevRecord, index);
6563
5786
  if (this._additionsTail === null) {
6564
5787
  // TODO(vicb):
@@ -6574,9 +5797,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
6574
5797
  return record;
6575
5798
  };
6576
5799
  /** @internal */
6577
- /** @internal */
6578
- DefaultIterableDiffer.prototype._insertAfter = /** @internal */
6579
- function (record, prevRecord, index) {
5800
+ DefaultIterableDiffer.prototype._insertAfter = function (record, prevRecord, index) {
6580
5801
  // TODO(vicb):
6581
5802
  // assert(record != prevRecord);
6582
5803
  // assert(record._next === null);
@@ -6607,15 +5828,11 @@ var DefaultIterableDiffer = /** @class */ (function () {
6607
5828
  return record;
6608
5829
  };
6609
5830
  /** @internal */
6610
- /** @internal */
6611
- DefaultIterableDiffer.prototype._remove = /** @internal */
6612
- function (record) {
5831
+ DefaultIterableDiffer.prototype._remove = function (record) {
6613
5832
  return this._addToRemovals(this._unlink(record));
6614
5833
  };
6615
5834
  /** @internal */
6616
- /** @internal */
6617
- DefaultIterableDiffer.prototype._unlink = /** @internal */
6618
- function (record) {
5835
+ DefaultIterableDiffer.prototype._unlink = function (record) {
6619
5836
  if (this._linkedRecords !== null) {
6620
5837
  this._linkedRecords.remove(record);
6621
5838
  }
@@ -6639,9 +5856,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
6639
5856
  return record;
6640
5857
  };
6641
5858
  /** @internal */
6642
- /** @internal */
6643
- DefaultIterableDiffer.prototype._addToMoves = /** @internal */
6644
- function (record, toIndex) {
5859
+ DefaultIterableDiffer.prototype._addToMoves = function (record, toIndex) {
6645
5860
  // TODO(vicb):
6646
5861
  // assert(record._nextMoved === null);
6647
5862
  if (record.previousIndex === toIndex) {
@@ -6682,9 +5897,7 @@ var DefaultIterableDiffer = /** @class */ (function () {
6682
5897
  return record;
6683
5898
  };
6684
5899
  /** @internal */
6685
- /** @internal */
6686
- DefaultIterableDiffer.prototype._addIdentityChange = /** @internal */
6687
- function (record, item) {
5900
+ DefaultIterableDiffer.prototype._addIdentityChange = function (record, item) {
6688
5901
  record.item = item;
6689
5902
  if (this._identityChangesTail === null) {
6690
5903
  this._identityChangesTail = this._identityChangesHead = record;
@@ -6738,26 +5951,13 @@ var _DuplicateItemRecordList = /** @class */ (function () {
6738
5951
  *
6739
5952
  * Note: by design all records in the list of duplicates hold the same value in record.item.
6740
5953
  */
6741
- /**
6742
- * Append the record to the list of duplicates.
6743
- *
6744
- * Note: by design all records in the list of duplicates hold the same value in record.item.
6745
- */
6746
- _DuplicateItemRecordList.prototype.add = /**
6747
- * Append the record to the list of duplicates.
6748
- *
6749
- * Note: by design all records in the list of duplicates hold the same value in record.item.
6750
- */
6751
- function (record) {
5954
+ _DuplicateItemRecordList.prototype.add = function (record) {
6752
5955
  if (this._head === null) {
6753
5956
  this._head = this._tail = record;
6754
5957
  record._nextDup = null;
6755
5958
  record._prevDup = null;
6756
5959
  }
6757
5960
  else {
6758
- // TODO(vicb):
6759
- // assert(record.item == _head.item ||
6760
- // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);
6761
5961
  // TODO(vicb):
6762
5962
  // assert(record.item == _head.item ||
6763
5963
  // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);
@@ -6769,15 +5969,10 @@ var _DuplicateItemRecordList = /** @class */ (function () {
6769
5969
  };
6770
5970
  // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and
6771
5971
  // IterableChangeRecord_.currentIndex >= atOrAfterIndex
6772
- // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and
6773
- // IterableChangeRecord_.currentIndex >= atOrAfterIndex
6774
- _DuplicateItemRecordList.prototype.get =
6775
- // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and
6776
- // IterableChangeRecord_.currentIndex >= atOrAfterIndex
6777
- function (trackById, atOrAfterIndex) {
5972
+ _DuplicateItemRecordList.prototype.get = function (trackById, atOrAfterIndex) {
6778
5973
  var record;
6779
5974
  for (record = this._head; record !== null; record = record._nextDup) {
6780
- if ((atOrAfterIndex === null || atOrAfterIndex <= (record.currentIndex)) &&
5975
+ if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) &&
6781
5976
  looseIdentical(record.trackById, trackById)) {
6782
5977
  return record;
6783
5978
  }
@@ -6789,17 +5984,7 @@ var _DuplicateItemRecordList = /** @class */ (function () {
6789
5984
  *
6790
5985
  * Returns whether the list of duplicates is empty.
6791
5986
  */
6792
- /**
6793
- * Remove one {@link IterableChangeRecord_} from the list of duplicates.
6794
- *
6795
- * Returns whether the list of duplicates is empty.
6796
- */
6797
- _DuplicateItemRecordList.prototype.remove = /**
6798
- * Remove one {@link IterableChangeRecord_} from the list of duplicates.
6799
- *
6800
- * Returns whether the list of duplicates is empty.
6801
- */
6802
- function (record) {
5987
+ _DuplicateItemRecordList.prototype.remove = function (record) {
6803
5988
  // TODO(vicb):
6804
5989
  // assert(() {
6805
5990
  // // verify that the record being removed is in the list.
@@ -6846,21 +6031,7 @@ var _DuplicateMap = /** @class */ (function () {
6846
6031
  * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
6847
6032
  * have any more `a`s needs to return the second `a`.
6848
6033
  */
6849
- /**
6850
- * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we
6851
- * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.
6852
- *
6853
- * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
6854
- * have any more `a`s needs to return the second `a`.
6855
- */
6856
- _DuplicateMap.prototype.get = /**
6857
- * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we
6858
- * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.
6859
- *
6860
- * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we
6861
- * have any more `a`s needs to return the second `a`.
6862
- */
6863
- function (trackById, atOrAfterIndex) {
6034
+ _DuplicateMap.prototype.get = function (trackById, atOrAfterIndex) {
6864
6035
  var key = trackById;
6865
6036
  var recordList = this.map.get(key);
6866
6037
  return recordList ? recordList.get(trackById, atOrAfterIndex) : null;
@@ -6870,19 +6041,9 @@ var _DuplicateMap = /** @class */ (function () {
6870
6041
  *
6871
6042
  * The list of duplicates also is removed from the map if it gets empty.
6872
6043
  */
6873
- /**
6874
- * Removes a {@link IterableChangeRecord_} from the list of duplicates.
6875
- *
6876
- * The list of duplicates also is removed from the map if it gets empty.
6877
- */
6878
- _DuplicateMap.prototype.remove = /**
6879
- * Removes a {@link IterableChangeRecord_} from the list of duplicates.
6880
- *
6881
- * The list of duplicates also is removed from the map if it gets empty.
6882
- */
6883
- function (record) {
6044
+ _DuplicateMap.prototype.remove = function (record) {
6884
6045
  var key = record.trackById;
6885
- var recordList = (this.map.get(key));
6046
+ var recordList = this.map.get(key);
6886
6047
  // Remove the list of duplicates when it gets empty
6887
6048
  if (recordList.remove(record)) {
6888
6049
  this.map.delete(key);
@@ -6988,15 +6149,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
6988
6149
  * Check the current state of the map vs the previous.
6989
6150
  * The algorithm is optimised for when the keys do no change.
6990
6151
  */
6991
- /**
6992
- * Check the current state of the map vs the previous.
6993
- * The algorithm is optimised for when the keys do no change.
6994
- */
6995
- DefaultKeyValueDiffer.prototype.check = /**
6996
- * Check the current state of the map vs the previous.
6997
- * The algorithm is optimised for when the keys do no change.
6998
- */
6999
- function (map) {
6152
+ DefaultKeyValueDiffer.prototype.check = function (map) {
7000
6153
  var _this = this;
7001
6154
  this._reset();
7002
6155
  var insertBefore = this._mapHead;
@@ -7045,23 +6198,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
7045
6198
  * - This method updates `this._appendAfter`,
7046
6199
  * - The return value is the new value for the insertion pointer.
7047
6200
  */
7048
- /**
7049
- * Inserts a record before `before` or append at the end of the list when `before` is null.
7050
- *
7051
- * Notes:
7052
- * - This method appends at `this._appendAfter`,
7053
- * - This method updates `this._appendAfter`,
7054
- * - The return value is the new value for the insertion pointer.
7055
- */
7056
- DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = /**
7057
- * Inserts a record before `before` or append at the end of the list when `before` is null.
7058
- *
7059
- * Notes:
7060
- * - This method appends at `this._appendAfter`,
7061
- * - This method updates `this._appendAfter`,
7062
- * - The return value is the new value for the insertion pointer.
7063
- */
7064
- function (before, record) {
6201
+ DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = function (before, record) {
7065
6202
  if (before) {
7066
6203
  var prev = before._prev;
7067
6204
  record._next = before;
@@ -7088,7 +6225,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
7088
6225
  };
7089
6226
  DefaultKeyValueDiffer.prototype._getOrCreateRecordForKey = function (key, value) {
7090
6227
  if (this._records.has(key)) {
7091
- var record_1 = (this._records.get(key));
6228
+ var record_1 = this._records.get(key);
7092
6229
  this._maybeAddToChanges(record_1, value);
7093
6230
  var prev = record_1._prev;
7094
6231
  var next = record_1._next;
@@ -7109,9 +6246,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
7109
6246
  return record;
7110
6247
  };
7111
6248
  /** @internal */
7112
- /** @internal */
7113
- DefaultKeyValueDiffer.prototype._reset = /** @internal */
7114
- function () {
6249
+ DefaultKeyValueDiffer.prototype._reset = function () {
7115
6250
  if (this.isDirty) {
7116
6251
  var record = void 0;
7117
6252
  // let `_previousMapHead` contain the state of the map before the changes
@@ -7133,10 +6268,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
7133
6268
  }
7134
6269
  };
7135
6270
  // Add the record or a given key to the list of changes only when the value has actually changed
7136
- // Add the record or a given key to the list of changes only when the value has actually changed
7137
- DefaultKeyValueDiffer.prototype._maybeAddToChanges =
7138
- // Add the record or a given key to the list of changes only when the value has actually changed
7139
- function (record, newValue) {
6271
+ DefaultKeyValueDiffer.prototype._maybeAddToChanges = function (record, newValue) {
7140
6272
  if (!looseIdentical(newValue, record.currentValue)) {
7141
6273
  record.previousValue = record.currentValue;
7142
6274
  record.currentValue = newValue;
@@ -7162,9 +6294,7 @@ var DefaultKeyValueDiffer = /** @class */ (function () {
7162
6294
  }
7163
6295
  };
7164
6296
  /** @internal */
7165
- /** @internal */
7166
- DefaultKeyValueDiffer.prototype._forEach = /** @internal */
7167
- function (obj, fn) {
6297
+ DefaultKeyValueDiffer.prototype._forEach = function (obj, fn) {
7168
6298
  if (obj instanceof Map) {
7169
6299
  obj.forEach(fn);
7170
6300
  }
@@ -7222,12 +6352,13 @@ var IterableDiffers = /** @class */ (function () {
7222
6352
  * inherited {@link IterableDiffers} instance with the provided factories and return a new
7223
6353
  * {@link IterableDiffers} instance.
7224
6354
  *
6355
+ * @usageNotes
6356
+ * ### Example
6357
+ *
7225
6358
  * The following example shows how to extend an existing list of factories,
7226
6359
  * which will only be applied to the injector for this component and its children.
7227
6360
  * This step is all that's required to make a new {@link IterableDiffer} available.
7228
6361
  *
7229
- * ### Example
7230
- *
7231
6362
  * ```
7232
6363
  * @Component({
7233
6364
  * viewProviders: [
@@ -7236,45 +6367,7 @@ var IterableDiffers = /** @class */ (function () {
7236
6367
  * })
7237
6368
  * ```
7238
6369
  */
7239
- /**
7240
- * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
7241
- * inherited {@link IterableDiffers} instance with the provided factories and return a new
7242
- * {@link IterableDiffers} instance.
7243
- *
7244
- * The following example shows how to extend an existing list of factories,
7245
- * which will only be applied to the injector for this component and its children.
7246
- * This step is all that's required to make a new {@link IterableDiffer} available.
7247
- *
7248
- * ### Example
7249
- *
7250
- * ```
7251
- * @Component({
7252
- * viewProviders: [
7253
- * IterableDiffers.extend([new ImmutableListDiffer()])
7254
- * ]
7255
- * })
7256
- * ```
7257
- */
7258
- IterableDiffers.extend = /**
7259
- * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
7260
- * inherited {@link IterableDiffers} instance with the provided factories and return a new
7261
- * {@link IterableDiffers} instance.
7262
- *
7263
- * The following example shows how to extend an existing list of factories,
7264
- * which will only be applied to the injector for this component and its children.
7265
- * This step is all that's required to make a new {@link IterableDiffer} available.
7266
- *
7267
- * ### Example
7268
- *
7269
- * ```
7270
- * @Component({
7271
- * viewProviders: [
7272
- * IterableDiffers.extend([new ImmutableListDiffer()])
7273
- * ]
7274
- * })
7275
- * ```
7276
- */
7277
- function (factories) {
6370
+ IterableDiffers.extend = function (factories) {
7278
6371
  return {
7279
6372
  provide: IterableDiffers,
7280
6373
  useFactory: function (parent) {
@@ -7336,12 +6429,13 @@ var KeyValueDiffers = /** @class */ (function () {
7336
6429
  * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
7337
6430
  * {@link KeyValueDiffers} instance.
7338
6431
  *
6432
+ * @usageNotes
6433
+ * ### Example
6434
+ *
7339
6435
  * The following example shows how to extend an existing list of factories,
7340
6436
  * which will only be applied to the injector for this component and its children.
7341
6437
  * This step is all that's required to make a new {@link KeyValueDiffer} available.
7342
6438
  *
7343
- * ### Example
7344
- *
7345
6439
  * ```
7346
6440
  * @Component({
7347
6441
  * viewProviders: [
@@ -7350,45 +6444,7 @@ var KeyValueDiffers = /** @class */ (function () {
7350
6444
  * })
7351
6445
  * ```
7352
6446
  */
7353
- /**
7354
- * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
7355
- * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
7356
- * {@link KeyValueDiffers} instance.
7357
- *
7358
- * The following example shows how to extend an existing list of factories,
7359
- * which will only be applied to the injector for this component and its children.
7360
- * This step is all that's required to make a new {@link KeyValueDiffer} available.
7361
- *
7362
- * ### Example
7363
- *
7364
- * ```
7365
- * @Component({
7366
- * viewProviders: [
7367
- * KeyValueDiffers.extend([new ImmutableMapDiffer()])
7368
- * ]
7369
- * })
7370
- * ```
7371
- */
7372
- KeyValueDiffers.extend = /**
7373
- * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
7374
- * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
7375
- * {@link KeyValueDiffers} instance.
7376
- *
7377
- * The following example shows how to extend an existing list of factories,
7378
- * which will only be applied to the injector for this component and its children.
7379
- * This step is all that's required to make a new {@link KeyValueDiffer} available.
7380
- *
7381
- * ### Example
7382
- *
7383
- * ```
7384
- * @Component({
7385
- * viewProviders: [
7386
- * KeyValueDiffers.extend([new ImmutableMapDiffer()])
7387
- * ]
7388
- * })
7389
- * ```
7390
- */
7391
- function (factories) {
6447
+ KeyValueDiffers.extend = function (factories) {
7392
6448
  return {
7393
6449
  provide: KeyValueDiffers,
7394
6450
  useFactory: function (parent) {
@@ -7438,6 +6494,11 @@ var defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
7438
6494
  * Use of this source code is governed by an MIT-style license that can be
7439
6495
  * found in the LICENSE file at https://angular.io/license
7440
6496
  */
6497
+ /**
6498
+ * @module
6499
+ * @description
6500
+ * Change detection enables data binding in Angular.
6501
+ */
7441
6502
 
7442
6503
  /**
7443
6504
  * @license
@@ -7472,8 +6533,9 @@ var platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS)
7472
6533
  * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
7473
6534
  * DecimalPipe and PercentPipe) and by ICU expressions.
7474
6535
  *
7475
- * See the {@linkDocs guide/i18n#setting-up-locale i18n guide} for more information.
6536
+ * See the [i18n guide](guide/i18n#setting-up-locale) for more information.
7476
6537
  *
6538
+ * @usageNotes
7477
6539
  * ### Example
7478
6540
  *
7479
6541
  * ```typescript
@@ -7493,8 +6555,9 @@ var LOCALE_ID = new InjectionToken('LocaleId');
7493
6555
  * Use this token at bootstrap to provide the content of your translation file (`xtb`,
7494
6556
  * `xlf` or `xlf2`) when you want to translate your application in another language.
7495
6557
  *
7496
- * See the {@linkDocs guide/i18n#merge i18n guide} for more information.
6558
+ * See the [i18n guide](guide/i18n#merge) for more information.
7497
6559
  *
6560
+ * @usageNotes
7498
6561
  * ### Example
7499
6562
  *
7500
6563
  * ```typescript
@@ -7517,8 +6580,9 @@ var TRANSLATIONS = new InjectionToken('Translations');
7517
6580
  * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
7518
6581
  * `xlf` or `xlf2`.
7519
6582
  *
7520
- * See the {@linkDocs guide/i18n#merge i18n guide} for more information.
6583
+ * See the [i18n guide](guide/i18n#merge) for more information.
7521
6584
  *
6585
+ * @usageNotes
7522
6586
  * ### Example
7523
6587
  *
7524
6588
  * ```typescript
@@ -7541,30 +6605,9 @@ var TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');
7541
6605
  * - Warning (default): show a warning in the console and/or shell.
7542
6606
  * - Ignore: do nothing.
7543
6607
  *
7544
- * See the {@linkDocs guide/i18n#missing-translation i18n guide} for more information.
7545
- *
7546
- * ### Example
7547
- * ```typescript
7548
- * import { MissingTranslationStrategy } from '@angular/core';
7549
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
7550
- * import { AppModule } from './app/app.module';
7551
- *
7552
- * platformBrowserDynamic().bootstrapModule(AppModule, {
7553
- * missingTranslation: MissingTranslationStrategy.Error
7554
- * });
7555
- * ```
7556
- *
7557
- * @experimental i18n support is experimental.
7558
- */
7559
- /**
7560
- * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
7561
- * that the compiler should use in case of missing translations:
7562
- * - Error: throw if you have missing translations.
7563
- * - Warning (default): show a warning in the console and/or shell.
7564
- * - Ignore: do nothing.
7565
- *
7566
- * See the {@linkDocs guide/i18n#missing-translation i18n guide} for more information.
6608
+ * See the [i18n guide](guide/i18n#missing-translation) for more information.
7567
6609
  *
6610
+ * @usageNotes
7568
6611
  * ### Example
7569
6612
  * ```typescript
7570
6613
  * import { MissingTranslationStrategy } from '@angular/core';
@@ -7579,28 +6622,6 @@ var TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');
7579
6622
  * @experimental i18n support is experimental.
7580
6623
  */
7581
6624
  var MissingTranslationStrategy;
7582
- /**
7583
- * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
7584
- * that the compiler should use in case of missing translations:
7585
- * - Error: throw if you have missing translations.
7586
- * - Warning (default): show a warning in the console and/or shell.
7587
- * - Ignore: do nothing.
7588
- *
7589
- * See the {@linkDocs guide/i18n#missing-translation i18n guide} for more information.
7590
- *
7591
- * ### Example
7592
- * ```typescript
7593
- * import { MissingTranslationStrategy } from '@angular/core';
7594
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
7595
- * import { AppModule } from './app/app.module';
7596
- *
7597
- * platformBrowserDynamic().bootstrapModule(AppModule, {
7598
- * missingTranslation: MissingTranslationStrategy.Error
7599
- * });
7600
- * ```
7601
- *
7602
- * @experimental i18n support is experimental.
7603
- */
7604
6625
  (function (MissingTranslationStrategy) {
7605
6626
  MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error";
7606
6627
  MissingTranslationStrategy[MissingTranslationStrategy["Warning"] = 1] = "Warning";
@@ -7652,7 +6673,7 @@ var ApplicationModule = /** @class */ (function () {
7652
6673
  ];
7653
6674
  /** @nocollapse */
7654
6675
  ApplicationModule.ctorParameters = function () { return [
7655
- { type: ApplicationRef, },
6676
+ { type: ApplicationRef }
7656
6677
  ]; };
7657
6678
  return ApplicationModule;
7658
6679
  }());
@@ -7712,17 +6733,7 @@ var InertBodyHelper = /** @class */ (function () {
7712
6733
  * See
7713
6734
  * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449
7714
6735
  */
7715
- /**
7716
- * Use XHR to create and fill an inert body element (on Safari 10.1)
7717
- * See
7718
- * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449
7719
- */
7720
- InertBodyHelper.prototype.getInertBodyElement_XHR = /**
7721
- * Use XHR to create and fill an inert body element (on Safari 10.1)
7722
- * See
7723
- * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449
7724
- */
7725
- function (html) {
6736
+ InertBodyHelper.prototype.getInertBodyElement_XHR = function (html) {
7726
6737
  // We add these extra elements to ensure that the rest of the content is parsed as expected
7727
6738
  // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the
7728
6739
  // `<head>` tag.
@@ -7738,7 +6749,7 @@ var InertBodyHelper = /** @class */ (function () {
7738
6749
  xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);
7739
6750
  xhr.send(null);
7740
6751
  var body = xhr.response.body;
7741
- body.removeChild((body.firstChild));
6752
+ body.removeChild(body.firstChild);
7742
6753
  return body;
7743
6754
  };
7744
6755
  /**
@@ -7746,17 +6757,7 @@ var InertBodyHelper = /** @class */ (function () {
7746
6757
  * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7
7747
6758
  *
7748
6759
  */
7749
- /**
7750
- * Use DOMParser to create and fill an inert body element (on Firefox)
7751
- * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7
7752
- *
7753
- */
7754
- InertBodyHelper.prototype.getInertBodyElement_DOMParser = /**
7755
- * Use DOMParser to create and fill an inert body element (on Firefox)
7756
- * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7
7757
- *
7758
- */
7759
- function (html) {
6760
+ InertBodyHelper.prototype.getInertBodyElement_DOMParser = function (html) {
7760
6761
  // We add these extra elements to ensure that the rest of the content is parsed as expected
7761
6762
  // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the
7762
6763
  // `<head>` tag.
@@ -7766,7 +6767,7 @@ var InertBodyHelper = /** @class */ (function () {
7766
6767
  .DOMParser()
7767
6768
  .parseFromString(html, 'text/html')
7768
6769
  .body;
7769
- body.removeChild((body.firstChild));
6770
+ body.removeChild(body.firstChild);
7770
6771
  return body;
7771
6772
  }
7772
6773
  catch (e) {
@@ -7779,19 +6780,7 @@ var InertBodyHelper = /** @class */ (function () {
7779
6780
  * This is the default sane strategy to use if the browser does not require one of the specialised
7780
6781
  * strategies above.
7781
6782
  */
7782
- /**
7783
- * Use an HTML5 `template` element, if supported, or an inert body element created via
7784
- * `createHtmlDocument` to create and fill an inert DOM element.
7785
- * This is the default sane strategy to use if the browser does not require one of the specialised
7786
- * strategies above.
7787
- */
7788
- InertBodyHelper.prototype.getInertBodyElement_InertDocument = /**
7789
- * Use an HTML5 `template` element, if supported, or an inert body element created via
7790
- * `createHtmlDocument` to create and fill an inert DOM element.
7791
- * This is the default sane strategy to use if the browser does not require one of the specialised
7792
- * strategies above.
7793
- */
7794
- function (html) {
6783
+ InertBodyHelper.prototype.getInertBodyElement_InertDocument = function (html) {
7795
6784
  // Prefer using <template> element if supported.
7796
6785
  var templateEl = this.inertDocument.createElement('template');
7797
6786
  if ('content' in templateEl) {
@@ -7814,23 +6803,7 @@ var InertBodyHelper = /** @class */ (function () {
7814
6803
  * This is undesirable since we don't want to allow any of these custom attributes. This method
7815
6804
  * strips them all.
7816
6805
  */
7817
- /**
7818
- * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'
7819
- * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.
7820
- * 'ns1:xlink:foo').
7821
- *
7822
- * This is undesirable since we don't want to allow any of these custom attributes. This method
7823
- * strips them all.
7824
- */
7825
- InertBodyHelper.prototype.stripCustomNsAttrs = /**
7826
- * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'
7827
- * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.
7828
- * 'ns1:xlink:foo').
7829
- *
7830
- * This is undesirable since we don't want to allow any of these custom attributes. This method
7831
- * strips them all.
7832
- */
7833
- function (el) {
6806
+ InertBodyHelper.prototype.stripCustomNsAttrs = function (el) {
7834
6807
  var elAttrs = el.attributes;
7835
6808
  // loop backwards so that we can support removals.
7836
6809
  for (var i = elAttrs.length - 1; 0 < i; i--) {
@@ -8016,20 +6989,20 @@ var SanitizingHtmlSerializer = /** @class */ (function () {
8016
6989
  // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.
8017
6990
  // However this code never accesses properties off of `document` before deleting its contents
8018
6991
  // again, so it shouldn't be vulnerable to DOM clobbering.
8019
- var current = (el.firstChild);
6992
+ var current = el.firstChild;
8020
6993
  while (current) {
8021
6994
  if (current.nodeType === Node.ELEMENT_NODE) {
8022
6995
  this.startElement(current);
8023
6996
  }
8024
6997
  else if (current.nodeType === Node.TEXT_NODE) {
8025
- this.chars((current.nodeValue));
6998
+ this.chars(current.nodeValue);
8026
6999
  }
8027
7000
  else {
8028
7001
  // Strip non-element, non-text nodes.
8029
7002
  this.sanitizedSomething = true;
8030
7003
  }
8031
7004
  if (current.firstChild) {
8032
- current = (current.firstChild);
7005
+ current = current.firstChild;
8033
7006
  continue;
8034
7007
  }
8035
7008
  while (current) {
@@ -8037,12 +7010,12 @@ var SanitizingHtmlSerializer = /** @class */ (function () {
8037
7010
  if (current.nodeType === Node.ELEMENT_NODE) {
8038
7011
  this.endElement(current);
8039
7012
  }
8040
- var next = this.checkClobberedElement(current, (current.nextSibling));
7013
+ var next = this.checkClobberedElement(current, current.nextSibling);
8041
7014
  if (next) {
8042
7015
  current = next;
8043
7016
  break;
8044
7017
  }
8045
- current = this.checkClobberedElement(current, (current.parentNode));
7018
+ current = this.checkClobberedElement(current, current.parentNode);
8046
7019
  }
8047
7020
  }
8048
7021
  return this.buf.join('');
@@ -8140,7 +7113,7 @@ function _sanitizeHtml(defaultDoc, unsafeHtmlInput) {
8140
7113
  inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);
8141
7114
  } while (unsafeHtml !== parsedHtml);
8142
7115
  var sanitizer = new SanitizingHtmlSerializer();
8143
- var safeHtml = sanitizer.sanitizeChildren(getTemplateContent((inertBodyElement)) || inertBodyElement);
7116
+ var safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);
8144
7117
  if (isDevMode() && sanitizer.sanitizedSomething) {
8145
7118
  console.warn('WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).');
8146
7119
  }
@@ -8264,22 +7237,6 @@ function _sanitizeStyle(value) {
8264
7237
  * Use of this source code is governed by an MIT-style license that can be
8265
7238
  * found in the LICENSE file at https://angular.io/license
8266
7239
  */
8267
- /**
8268
- * @license
8269
- * Copyright Google Inc. All Rights Reserved.
8270
- *
8271
- * Use of this source code is governed by an MIT-style license that can be
8272
- * found in the LICENSE file at https://angular.io/license
8273
- */
8274
- /**
8275
- * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
8276
- * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
8277
- * handled.
8278
- *
8279
- * See DomSanitizer for more details on security in Angular applications.
8280
- *
8281
- *
8282
- */
8283
7240
  /**
8284
7241
  * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
8285
7242
  * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
@@ -8290,15 +7247,6 @@ function _sanitizeStyle(value) {
8290
7247
  *
8291
7248
  */
8292
7249
  var SecurityContext;
8293
- /**
8294
- * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
8295
- * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
8296
- * handled.
8297
- *
8298
- * See DomSanitizer for more details on security in Angular applications.
8299
- *
8300
- *
8301
- */
8302
7250
  (function (SecurityContext) {
8303
7251
  SecurityContext[SecurityContext["NONE"] = 0] = "NONE";
8304
7252
  SecurityContext[SecurityContext["HTML"] = 1] = "HTML";
@@ -8397,23 +7345,23 @@ var DebugContext = /** @class */ (function () {
8397
7345
  * debug mode can hook it. It is lazily filled when `isDevMode` is known.
8398
7346
  */
8399
7347
  var Services = {
8400
- setCurrentNode: (undefined),
8401
- createRootView: (undefined),
8402
- createEmbeddedView: (undefined),
8403
- createComponentView: (undefined),
8404
- createNgModuleRef: (undefined),
8405
- overrideProvider: (undefined),
8406
- overrideComponentView: (undefined),
8407
- clearOverrides: (undefined),
8408
- checkAndUpdateView: (undefined),
8409
- checkNoChangesView: (undefined),
8410
- destroyView: (undefined),
8411
- resolveDep: (undefined),
8412
- createDebugContext: (undefined),
8413
- handleEvent: (undefined),
8414
- updateDirectives: (undefined),
8415
- updateRenderer: (undefined),
8416
- dirtyParentQueries: (undefined),
7348
+ setCurrentNode: undefined,
7349
+ createRootView: undefined,
7350
+ createEmbeddedView: undefined,
7351
+ createComponentView: undefined,
7352
+ createNgModuleRef: undefined,
7353
+ overrideProvider: undefined,
7354
+ overrideComponentView: undefined,
7355
+ clearOverrides: undefined,
7356
+ checkAndUpdateView: undefined,
7357
+ checkNoChangesView: undefined,
7358
+ destroyView: undefined,
7359
+ resolveDep: undefined,
7360
+ createDebugContext: undefined,
7361
+ handleEvent: undefined,
7362
+ updateDirectives: undefined,
7363
+ updateRenderer: undefined,
7364
+ dirtyParentQueries: undefined,
8417
7365
  };
8418
7366
 
8419
7367
  /**
@@ -8677,7 +7625,7 @@ function rootRenderNodes(view) {
8677
7625
  function visitRootRenderNodes(view, action, parentNode, nextSibling, target) {
8678
7626
  // We need to re-compute the parent node in case the nodes have been moved around manually
8679
7627
  if (action === 3 /* RemoveChild */) {
8680
- parentNode = view.renderer.parentNode(renderNode(view, (view.def.lastRenderRootNode)));
7628
+ parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode));
8681
7629
  }
8682
7630
  visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);
8683
7631
  }
@@ -8697,13 +7645,13 @@ function visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nex
8697
7645
  compView = compView.parent;
8698
7646
  }
8699
7647
  var hostView = compView.parent;
8700
- var hostElDef = viewParentEl((compView));
7648
+ var hostElDef = viewParentEl(compView);
8701
7649
  var startIndex = hostElDef.nodeIndex + 1;
8702
7650
  var endIndex = hostElDef.nodeIndex + hostElDef.childCount;
8703
7651
  for (var i = startIndex; i <= endIndex; i++) {
8704
7652
  var nodeDef = hostView.def.nodes[i];
8705
7653
  if (nodeDef.ngContentIndex === ngContentIndex) {
8706
- visitRenderNode((hostView), nodeDef, action, parentNode, nextSibling, target);
7654
+ visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target);
8707
7655
  }
8708
7656
  // jump to next sibling
8709
7657
  i += nodeDef.childCount;
@@ -8769,7 +7717,7 @@ function execRenderNodeAction(view, renderNode, action, parentNode, nextSibling,
8769
7717
  var NS_PREFIX_RE = /^:([^:]+):(.+)$/;
8770
7718
  function splitNamespace(name) {
8771
7719
  if (name[0] === ':') {
8772
- var match = (name.match(NS_PREFIX_RE));
7720
+ var match = name.match(NS_PREFIX_RE);
8773
7721
  return [match[1], match[2]];
8774
7722
  }
8775
7723
  return ['', name];
@@ -8878,8 +7826,8 @@ function elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childC
8878
7826
  handleEvent = NOOP;
8879
7827
  }
8880
7828
  var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;
8881
- var ns = (null);
8882
- var name = (null);
7829
+ var ns = null;
7830
+ var name = null;
8883
7831
  if (namespaceAndName) {
8884
7832
  _b = __read(splitNamespace(namespaceAndName), 2), ns = _b[0], name = _b[1];
8885
7833
  }
@@ -8888,8 +7836,8 @@ function elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childC
8888
7836
  for (var i = 0; i < bindings.length; i++) {
8889
7837
  var _c = __read(bindings[i], 3), bindingFlags = _c[0], namespaceAndName_1 = _c[1], suffixOrSecurityContext = _c[2];
8890
7838
  var _d = __read(splitNamespace(namespaceAndName_1), 2), ns_1 = _d[0], name_1 = _d[1];
8891
- var securityContext = (undefined);
8892
- var suffix = (undefined);
7839
+ var securityContext = undefined;
7840
+ var suffix = undefined;
8893
7841
  switch (bindingFlags & 15 /* Types */) {
8894
7842
  case 4 /* TypeElementStyle */:
8895
7843
  suffix = suffixOrSecurityContext;
@@ -8960,7 +7908,7 @@ function elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childC
8960
7908
  var _b;
8961
7909
  }
8962
7910
  function createElement(view, renderHost, def) {
8963
- var elDef = (def.element);
7911
+ var elDef = def.element;
8964
7912
  var rootSelectorOrNode = view.root.selectorOrNode;
8965
7913
  var renderer = view.renderer;
8966
7914
  var el;
@@ -9044,7 +7992,7 @@ function checkAndUpdateElementValue(view, def, bindingIdx, value) {
9044
7992
  var binding = def.bindings[bindingIdx];
9045
7993
  var elData = asElementData(view, def.nodeIndex);
9046
7994
  var renderNode$$1 = elData.renderElement;
9047
- var name = (binding.name);
7995
+ var name = binding.name;
9048
7996
  switch (binding.flags & 15 /* Types */) {
9049
7997
  case 1 /* TypeElementAttribute */:
9050
7998
  setElementAttribute(view, binding, renderNode$$1, binding.ns, name, value);
@@ -9214,6 +8162,9 @@ function resolveNgModuleDep(data, depDef, notFoundValue) {
9214
8162
  return (data._providers[index] =
9215
8163
  _createProviderInstance$1(data, data._def.providersByKey[depDef.tokenKey]));
9216
8164
  }
8165
+ else if (depDef.flags & 4 /* Self */) {
8166
+ return notFoundValue;
8167
+ }
9217
8168
  return data._parent.get(depDef.token, notFoundValue);
9218
8169
  }
9219
8170
  finally {
@@ -9322,10 +8273,10 @@ function attachEmbeddedView(parentView, elementData, viewIndex, view) {
9322
8273
  viewIndex = embeddedViews.length;
9323
8274
  }
9324
8275
  view.viewContainerParent = parentView;
9325
- addToArray(embeddedViews, (viewIndex), view);
8276
+ addToArray(embeddedViews, viewIndex, view);
9326
8277
  attachProjectedView(elementData, view);
9327
8278
  Services.dirtyParentQueries(view);
9328
- var prevView = (viewIndex) > 0 ? embeddedViews[(viewIndex) - 1] : null;
8279
+ var prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null;
9329
8280
  renderAttachEmbeddedView(elementData, prevView, view);
9330
8281
  }
9331
8282
  function attachProjectedView(vcElementData, view) {
@@ -9349,7 +8300,7 @@ function attachProjectedView(vcElementData, view) {
9349
8300
  projectedViews.push(view);
9350
8301
  // Note: we are changing the NodeDef here as we cannot calculate
9351
8302
  // the fact whether a template is used for projection during compilation.
9352
- markNodeAsProjectedTemplate(view.parent.def, (view.parentNodeDef));
8303
+ markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef);
9353
8304
  }
9354
8305
  function markNodeAsProjectedTemplate(viewDef, nodeDef) {
9355
8306
  if (nodeDef.flags & 4 /* ProjectedTemplate */) {
@@ -9409,7 +8360,7 @@ function moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {
9409
8360
  return view;
9410
8361
  }
9411
8362
  function renderAttachEmbeddedView(elementData, prevView, view) {
9412
- var prevRenderNode = prevView ? renderNode(prevView, (prevView.def.lastRenderRootNode)) :
8363
+ var prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) :
9413
8364
  elementData.renderElement;
9414
8365
  var parentNode = view.renderer.parentNode(prevRenderNode);
9415
8366
  var nextSibling = view.renderer.nextSibling(prevRenderNode);
@@ -9473,7 +8424,7 @@ var ComponentFactory_ = /** @class */ (function (_super) {
9473
8424
  Object.defineProperty(ComponentFactory_.prototype, "inputs", {
9474
8425
  get: function () {
9475
8426
  var inputsArr = [];
9476
- var inputs = (this._inputs);
8427
+ var inputs = this._inputs;
9477
8428
  for (var propName in inputs) {
9478
8429
  var templateName = inputs[propName];
9479
8430
  inputsArr.push({ propName: propName, templateName: templateName });
@@ -9498,13 +8449,7 @@ var ComponentFactory_ = /** @class */ (function (_super) {
9498
8449
  /**
9499
8450
  * Creates a new component.
9500
8451
  */
9501
- /**
9502
- * Creates a new component.
9503
- */
9504
- ComponentFactory_.prototype.create = /**
9505
- * Creates a new component.
9506
- */
9507
- function (injector, projectableNodes, rootSelectorOrNode, ngModule) {
8452
+ ComponentFactory_.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {
9508
8453
  if (!ngModule) {
9509
8454
  throw new Error('ngModule should be provided');
9510
8455
  }
@@ -9562,8 +8507,8 @@ var ViewContainerRef_ = /** @class */ (function () {
9562
8507
  this._elDef = _elDef;
9563
8508
  this._data = _data;
9564
8509
  /**
9565
- * @internal
9566
- */
8510
+ * @internal
8511
+ */
9567
8512
  this._embeddedViews = [];
9568
8513
  }
9569
8514
  Object.defineProperty(ViewContainerRef_.prototype, "element", {
@@ -9582,7 +8527,7 @@ var ViewContainerRef_ = /** @class */ (function () {
9582
8527
  var elDef = this._elDef.parent;
9583
8528
  while (!elDef && view) {
9584
8529
  elDef = viewParentEl(view);
9585
- view = (view.parent);
8530
+ view = view.parent;
9586
8531
  }
9587
8532
  return view ? new Injector_(view, elDef) : new Injector_(this._view, null);
9588
8533
  },
@@ -9592,7 +8537,7 @@ var ViewContainerRef_ = /** @class */ (function () {
9592
8537
  ViewContainerRef_.prototype.clear = function () {
9593
8538
  var len = this._embeddedViews.length;
9594
8539
  for (var i = len - 1; i >= 0; i--) {
9595
- var view = (detachEmbeddedView(this._data, i));
8540
+ var view = detachEmbeddedView(this._data, i);
9596
8541
  Services.destroyView(view);
9597
8542
  }
9598
8543
  };
@@ -9745,7 +8690,7 @@ var TemplateRef_ = /** @class */ (function (_super) {
9745
8690
  return _this;
9746
8691
  }
9747
8692
  TemplateRef_.prototype.createEmbeddedView = function (context) {
9748
- return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, (this._def.element.template), context));
8693
+ return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context));
9749
8694
  };
9750
8695
  Object.defineProperty(TemplateRef_.prototype, "elementRef", {
9751
8696
  get: function () {
@@ -10024,13 +8969,13 @@ function createPipeInstance(view, def) {
10024
8969
  // pipes can see the private services of the component
10025
8970
  var allowPrivateServices = true;
10026
8971
  // pipes are always eager and classes!
10027
- return createClass((compView.parent), (viewParentEl(compView)), allowPrivateServices, def.provider.value, def.provider.deps);
8972
+ return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps);
10028
8973
  }
10029
8974
  function createDirectiveInstance(view, def) {
10030
8975
  // components can see other private services, other directives can't.
10031
8976
  var allowPrivateServices = (def.flags & 32768 /* Component */) > 0;
10032
8977
  // directives are always eager and classes!
10033
- var instance = createClass(view, (def.parent), allowPrivateServices, def.provider.value, def.provider.deps);
8978
+ var instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps);
10034
8979
  if (def.outputs.length) {
10035
8980
  for (var i = 0; i < def.outputs.length; i++) {
10036
8981
  var output = def.outputs[i];
@@ -10047,7 +8992,7 @@ function checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7
10047
8992
  var providerData = asProviderData(view, def.nodeIndex);
10048
8993
  var directive = providerData.instance;
10049
8994
  var changed = false;
10050
- var changes = (undefined);
8995
+ var changes = undefined;
10051
8996
  var bindLen = def.bindings.length;
10052
8997
  if (bindLen > 0 && checkBinding(view, def, 0, v0)) {
10053
8998
  changed = true;
@@ -10105,7 +9050,7 @@ function checkAndUpdateDirectiveDynamic(view, def, values) {
10105
9050
  var providerData = asProviderData(view, def.nodeIndex);
10106
9051
  var directive = providerData.instance;
10107
9052
  var changed = false;
10108
- var changes = (undefined);
9053
+ var changes = undefined;
10109
9054
  for (var i = 0; i < values.length; i++) {
10110
9055
  if (checkBinding(view, def, i, values[i])) {
10111
9056
  changed = true;
@@ -10130,11 +9075,11 @@ function _createProviderInstance(view, def) {
10130
9075
  var providerDef = def.provider;
10131
9076
  switch (def.flags & 201347067 /* Types */) {
10132
9077
  case 512 /* TypeClassProvider */:
10133
- return createClass(view, (def.parent), allowPrivateServices, providerDef.value, providerDef.deps);
9078
+ return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);
10134
9079
  case 1024 /* TypeFactoryProvider */:
10135
- return callFactory(view, (def.parent), allowPrivateServices, providerDef.value, providerDef.deps);
9080
+ return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);
10136
9081
  case 2048 /* TypeUseExistingProvider */:
10137
- return resolveDep(view, (def.parent), allowPrivateServices, providerDef.deps[0]);
9082
+ return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]);
10138
9083
  case 256 /* TypeValueProvider */:
10139
9084
  return providerDef.value;
10140
9085
  }
@@ -10212,7 +9157,7 @@ function resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue) {
10212
9157
  }
10213
9158
  if (elDef && (depDef.flags & 1 /* SkipSelf */)) {
10214
9159
  allowPrivateServices = false;
10215
- elDef = (elDef.parent);
9160
+ elDef = elDef.parent;
10216
9161
  }
10217
9162
  var searchView = view;
10218
9163
  while (searchView) {
@@ -10257,8 +9202,8 @@ function resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue) {
10257
9202
  }
10258
9203
  }
10259
9204
  allowPrivateServices = isComponentView(searchView);
10260
- elDef = (viewParentEl(searchView));
10261
- searchView = (searchView.parent);
9205
+ elDef = viewParentEl(searchView);
9206
+ searchView = searchView.parent;
10262
9207
  if (depDef.flags & 4 /* Self */) {
10263
9208
  searchView = null;
10264
9209
  }
@@ -10296,7 +9241,7 @@ function updateProp(view, providerData, def, bindingIdx, value, changes) {
10296
9241
  }
10297
9242
  }
10298
9243
  var binding = def.bindings[bindingIdx];
10299
- var propName = (binding.name);
9244
+ var propName = binding.name;
10300
9245
  // Note: This is still safe with Closure Compiler as
10301
9246
  // the user passed in the property name as an object has to `providerDef`,
10302
9247
  // so Closure Compiler will have renamed the property correctly already.
@@ -10468,7 +9413,7 @@ function createQuery() {
10468
9413
  function dirtyParentQueries(view) {
10469
9414
  var queryIds = view.def.nodeMatchedQueries;
10470
9415
  while (view.parent && isEmbeddedView(view)) {
10471
- var tplDef = (view.parentNodeDef);
9416
+ var tplDef = view.parentNodeDef;
10472
9417
  view = view.parent;
10473
9418
  // content queries
10474
9419
  var end = tplDef.nodeIndex + tplDef.childCount;
@@ -10505,14 +9450,14 @@ function checkAndUpdateQuery(view, nodeDef) {
10505
9450
  return;
10506
9451
  }
10507
9452
  var directiveInstance;
10508
- var newValues = (undefined);
9453
+ var newValues = undefined;
10509
9454
  if (nodeDef.flags & 67108864 /* TypeContentQuery */) {
10510
- var elementDef = (nodeDef.parent.parent);
10511
- newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, (nodeDef.query), []);
9455
+ var elementDef = nodeDef.parent.parent;
9456
+ newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query, []);
10512
9457
  directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;
10513
9458
  }
10514
9459
  else if (nodeDef.flags & 134217728 /* TypeViewQuery */) {
10515
- newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, (nodeDef.query), []);
9460
+ newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []);
10516
9461
  directiveInstance = view.component;
10517
9462
  }
10518
9463
  queryList.reset(newValues);
@@ -11039,7 +9984,6 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
11039
9984
  if (!currentElementHasPublicProviders) {
11040
9985
  currentElementHasPublicProviders = true;
11041
9986
  // Use prototypical inheritance to not get O(n^2) complexity...
11042
- // Use prototypical inheritance to not get O(n^2) complexity...
11043
9987
  currentParent.element.publicProviders =
11044
9988
  Object.create(currentParent.element.publicProviders);
11045
9989
  currentParent.element.allProviders = currentParent.element.publicProviders;
@@ -11053,7 +9997,6 @@ function viewDef(flags, nodes, updateDirectives, updateRenderer) {
11053
9997
  if (!currentElementHasPrivateProviders) {
11054
9998
  currentElementHasPrivateProviders = true;
11055
9999
  // Use prototypical inheritance to not get O(n^2) complexity...
11056
- // Use prototypical inheritance to not get O(n^2) complexity...
11057
10000
  currentParent.element.allProviders =
11058
10001
  Object.create(currentParent.element.publicProviders);
11059
10002
  }
@@ -11203,7 +10146,7 @@ function createViewNodes(view) {
11203
10146
  var renderHost;
11204
10147
  if (isComponentView(view)) {
11205
10148
  var hostDef = view.parentNodeDef;
11206
- renderHost = asElementData((view.parent), hostDef.parent.nodeIndex).renderElement;
10149
+ renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement;
11207
10150
  }
11208
10151
  var def = view.def;
11209
10152
  var nodes = view.nodes;
@@ -11214,9 +10157,9 @@ function createViewNodes(view) {
11214
10157
  switch (nodeDef.flags & 201347067 /* Types */) {
11215
10158
  case 1 /* TypeElement */:
11216
10159
  var el = createElement(view, renderHost, nodeDef);
11217
- var componentView = (undefined);
10160
+ var componentView = undefined;
11218
10161
  if (nodeDef.flags & 33554432 /* ComponentView */) {
11219
- var compViewDef = resolveDefinition((nodeDef.element.componentView));
10162
+ var compViewDef = resolveDefinition(nodeDef.element.componentView);
11220
10163
  componentView = Services.createComponentView(view, nodeDef, compViewDef, el);
11221
10164
  }
11222
10165
  listenToElementOutputs(view, componentView, nodeDef, el);
@@ -11651,14 +10594,10 @@ function createProdServices() {
11651
10594
  handleEvent: function (view, nodeIndex, eventName, event) {
11652
10595
  return view.def.handleEvent(view, nodeIndex, eventName, event);
11653
10596
  },
11654
- updateDirectives: function (view, checkType) {
11655
- return view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :
11656
- prodCheckNoChangesNode, view);
11657
- },
11658
- updateRenderer: function (view, checkType) {
11659
- return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :
11660
- prodCheckNoChangesNode, view);
11661
- },
10597
+ updateDirectives: function (view, checkType) { return view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :
10598
+ prodCheckNoChangesNode, view); },
10599
+ updateRenderer: function (view, checkType) { return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :
10600
+ prodCheckNoChangesNode, view); },
11662
10601
  };
11663
10602
  }
11664
10603
  function createDebugServices() {
@@ -11730,7 +10669,7 @@ function debugOverrideProvider(override) {
11730
10669
  }
11731
10670
  function debugOverrideComponentView(comp, compFactory) {
11732
10671
  var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));
11733
- var compViewDef = resolveDefinition((hostViewDef.nodes[0].element.componentView));
10672
+ var compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView);
11734
10673
  viewDefOverrides.set(comp, compViewDef);
11735
10674
  }
11736
10675
  function debugClearOverrides() {
@@ -11783,7 +10722,7 @@ function applyProviderOverridesToView(def) {
11783
10722
  return;
11784
10723
  }
11785
10724
  if (nodeDef.flags & 3840 /* CatProviderNoDirective */) {
11786
- var provider = (nodeDef.provider);
10725
+ var provider = nodeDef.provider;
11787
10726
  var override = providerOverrides.get(provider.token);
11788
10727
  if (override) {
11789
10728
  nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags;
@@ -11968,11 +10907,11 @@ function debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {
11968
10907
  var binding = nodeDef.bindings[i];
11969
10908
  var value = values[i];
11970
10909
  if (binding.flags & 8 /* TypeProperty */) {
11971
- bindingValues[normalizeDebugBindingName((binding.nonMinifiedName))] =
10910
+ bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] =
11972
10911
  normalizeDebugBindingValue(value);
11973
10912
  }
11974
10913
  }
11975
- var elDef = (nodeDef.parent);
10914
+ var elDef = nodeDef.parent;
11976
10915
  var el = asElementData(view, elDef.nodeIndex).renderElement;
11977
10916
  if (!elDef.element.name) {
11978
10917
  // a comment.
@@ -12049,12 +10988,12 @@ var DebugContext_ = /** @class */ (function () {
12049
10988
  var elDef = this.nodeDef;
12050
10989
  var elView = view;
12051
10990
  while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) {
12052
- elDef = (elDef.parent);
10991
+ elDef = elDef.parent;
12053
10992
  }
12054
10993
  if (!elDef) {
12055
10994
  while (!elDef && elView) {
12056
- elDef = (viewParentEl(elView));
12057
- elView = (elView.parent);
10995
+ elDef = viewParentEl(elView);
10996
+ elView = elView.parent;
12058
10997
  }
12059
10998
  }
12060
10999
  this.elDef = elDef;
@@ -12183,7 +11122,7 @@ function getRenderNodeIndex(viewDef$$1, nodeIndex) {
12183
11122
  }
12184
11123
  function findHostElement(view) {
12185
11124
  while (view && !isComponentView(view)) {
12186
- view = (view.parent);
11125
+ view = view.parent;
12187
11126
  }
12188
11127
  if (view.parent) {
12189
11128
  return asElementData(view.parent, viewParentEl(view).nodeIndex);
@@ -12211,7 +11150,7 @@ function callWithDebugContext(action, fn, self, args) {
12211
11150
  if (isViewDebugError(e) || !_currentView) {
12212
11151
  throw e;
12213
11152
  }
12214
- throw viewWrappedDebugError(e, (getCurrentDebugContext()));
11153
+ throw viewWrappedDebugError(e, getCurrentDebugContext());
12215
11154
  }
12216
11155
  }
12217
11156
  function getCurrentDebugContext() {
@@ -12248,7 +11187,7 @@ var DebugRenderer2 = /** @class */ (function () {
12248
11187
  this.data = this.delegate.data;
12249
11188
  }
12250
11189
  DebugRenderer2.prototype.destroyNode = function (node) {
12251
- removeDebugNodeFromIndex((getDebugNode(node)));
11190
+ removeDebugNodeFromIndex(getDebugNode(node));
12252
11191
  if (this.delegate.destroyNode) {
12253
11192
  this.delegate.destroyNode(node);
12254
11193
  }
@@ -12291,7 +11230,7 @@ var DebugRenderer2 = /** @class */ (function () {
12291
11230
  DebugRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {
12292
11231
  var debugEl = getDebugNode(parent);
12293
11232
  var debugChildEl = getDebugNode(newChild);
12294
- var debugRefEl = (getDebugNode(refChild));
11233
+ var debugRefEl = getDebugNode(refChild);
12295
11234
  if (debugEl && debugChildEl && debugEl instanceof DebugElement) {
12296
11235
  debugEl.insertBefore(debugRefEl, debugChildEl);
12297
11236
  }
@@ -12580,7 +11519,7 @@ function queueDestroyHooks(def, tView, i) {
12580
11519
  */
12581
11520
  function executeInitHooks(currentView, tView, creationMode) {
12582
11521
  if (currentView.lifecycleStage === 1 /* Init */) {
12583
- executeHooks((currentView.directives), tView.initHooks, tView.checkHooks, creationMode);
11522
+ executeHooks(currentView.directives, tView.initHooks, tView.checkHooks, creationMode);
12584
11523
  currentView.lifecycleStage = 2 /* AfterInit */;
12585
11524
  }
12586
11525
  }
@@ -12695,9 +11634,7 @@ function typeName(type) {
12695
11634
  * found in the LICENSE file at https://angular.io/license
12696
11635
  */
12697
11636
  // TODO: cleanup once the code is merged in angular/angular
12698
- // TODO: cleanup once the code is merged in angular/angular
12699
11637
  var RendererStyleFlags3;
12700
- // TODO: cleanup once the code is merged in angular/angular
12701
11638
  (function (RendererStyleFlags3) {
12702
11639
  RendererStyleFlags3[RendererStyleFlags3["Important"] = 1] = "Important";
12703
11640
  RendererStyleFlags3[RendererStyleFlags3["DashCase"] = 2] = "DashCase";
@@ -12809,7 +11746,7 @@ function findNextRNodeSibling(node, stopNode) {
12809
11746
  if (nativeNode) {
12810
11747
  return nativeNode;
12811
11748
  }
12812
- pNextOrParent = (pNextOrParent.pNextOrParent);
11749
+ pNextOrParent = pNextOrParent.pNextOrParent;
12813
11750
  }
12814
11751
  currentNode = pNextOrParent;
12815
11752
  }
@@ -12927,21 +11864,18 @@ function addRemoveViewFromContainer(container, rootNode, insertMode, beforeNode)
12927
11864
  if (node.type === 3 /* Element */) {
12928
11865
  if (insertMode) {
12929
11866
  if (!node.native) {
12930
- // If the native element doesn't exist, this is a bound text node that hasn't yet been
12931
- // created because update mode has not run (occurs when a bound text node is a root
12932
- // node of a dynamically created view). See textBinding() in instructions for ctx.
12933
11867
  // If the native element doesn't exist, this is a bound text node that hasn't yet been
12934
11868
  // created because update mode has not run (occurs when a bound text node is a root
12935
11869
  // node of a dynamically created view). See textBinding() in instructions for ctx.
12936
11870
  node.native = createTextNode('', renderer);
12937
11871
  }
12938
11872
  isProceduralRenderer(renderer) ?
12939
- renderer.insertBefore(parent, (node.native), beforeNode) :
12940
- parent.insertBefore((node.native), beforeNode, true);
11873
+ renderer.insertBefore(parent, node.native, beforeNode) :
11874
+ parent.insertBefore(node.native, beforeNode, true);
12941
11875
  }
12942
11876
  else {
12943
- isProceduralRenderer(renderer) ? renderer.removeChild(parent, (node.native)) :
12944
- parent.removeChild((node.native));
11877
+ isProceduralRenderer(renderer) ? renderer.removeChild(parent, node.native) :
11878
+ parent.removeChild(node.native);
12945
11879
  }
12946
11880
  nextNode = node.next;
12947
11881
  }
@@ -13123,7 +12057,7 @@ function cleanUpView(view) {
13123
12057
  }
13124
12058
  /** Removes listeners and unsubscribes from output subscriptions */
13125
12059
  function removeListeners(view) {
13126
- var cleanup = (view.cleanup);
12060
+ var cleanup = view.cleanup;
13127
12061
  if (cleanup != null) {
13128
12062
  for (var i = 0; i < cleanup.length - 1; i += 2) {
13129
12063
  if (typeof cleanup[i] === 'string') {
@@ -13142,14 +12076,14 @@ function executeOnDestroys(view) {
13142
12076
  var tView = view.tView;
13143
12077
  var destroyHooks;
13144
12078
  if (tView != null && (destroyHooks = tView.destroyHooks) != null) {
13145
- callHooks((view.directives), destroyHooks);
12079
+ callHooks(view.directives, destroyHooks);
13146
12080
  }
13147
12081
  }
13148
12082
  /** Calls pipe destroy hooks for this view */
13149
12083
  function executePipeOnDestroys(view) {
13150
12084
  var pipeDestroyHooks = view.tView && view.tView.pipeDestroyHooks;
13151
12085
  if (pipeDestroyHooks) {
13152
- callHooks((view.data), pipeDestroyHooks);
12086
+ callHooks(view.data, pipeDestroyHooks);
13153
12087
  }
13154
12088
  }
13155
12089
  /**
@@ -13203,13 +12137,13 @@ function appendChild(parent, child, currentView) {
13203
12137
  * @param currentView Current LView
13204
12138
  */
13205
12139
  function insertChild(node, currentView) {
13206
- var parent = (node.parent);
12140
+ var parent = node.parent;
13207
12141
  if (canInsertNativeNode(parent, currentView)) {
13208
12142
  var nativeSibling = findNextRNodeSibling(node, null);
13209
12143
  var renderer = currentView.renderer;
13210
12144
  isProceduralRenderer(renderer) ?
13211
- renderer.insertBefore((parent.native), (node.native), nativeSibling) :
13212
- parent.native.insertBefore((node.native), nativeSibling, false);
12145
+ renderer.insertBefore(parent.native, node.native, nativeSibling) :
12146
+ parent.native.insertBefore(node.native, nativeSibling, false);
13213
12147
  }
13214
12148
  }
13215
12149
  /**
@@ -13271,7 +12205,7 @@ function isCssClassMatching(nodeClassAttrVal, cssClassToMatch) {
13271
12205
  function isNodeMatchingSelector(tNode, selector) {
13272
12206
  ngDevMode && assertNotNull(selector[0], 'Selector should have a tag name');
13273
12207
  var mode = 4;
13274
- var nodeAttrs = (tNode.attrs);
12208
+ var nodeAttrs = tNode.attrs;
13275
12209
  // When processing ":not" selectors, we skip to the next ":not" if the
13276
12210
  // current one doesn't match
13277
12211
  var skipToNextSelector = false;
@@ -13480,7 +12414,7 @@ var tData;
13480
12414
  * as we enter the view. Declaring the type as `null` would require us to place `!`
13481
12415
  * in most instructions since they all assume that `currentView` is defined.
13482
12416
  */
13483
- var currentView = (null);
12417
+ var currentView = null;
13484
12418
  var currentQueries;
13485
12419
  function getCurrentQueries(QueryType) {
13486
12420
  // top level variables should not be exported for performance reason (PERF_NOTES.md)
@@ -13570,7 +12504,7 @@ function enterView(newView, host) {
13570
12504
  */
13571
12505
  function leaveView(newView) {
13572
12506
  if (!checkNoChangesMode) {
13573
- executeHooks((directives), currentView.tView.viewHooks, currentView.tView.viewCheckHooks, creationMode);
12507
+ executeHooks(directives, currentView.tView.viewHooks, currentView.tView.viewCheckHooks, creationMode);
13574
12508
  }
13575
12509
  // Views should be clean and in update mode after being checked, so these bits are cleared
13576
12510
  currentView.flags &= ~(1 /* CreationMode */ | 4 /* Dirty */);
@@ -13590,7 +12524,7 @@ function refreshDirectives() {
13590
12524
  /** Sets the host bindings for the current view. */
13591
12525
  function setHostBindings(bindings) {
13592
12526
  if (bindings != null) {
13593
- var defs = (currentView.tView.directives);
12527
+ var defs = currentView.tView.directives;
13594
12528
  for (var i = 0; i < bindings.length; i += 2) {
13595
12529
  var dirIndex = bindings[i];
13596
12530
  var def = defs[dirIndex];
@@ -13610,17 +12544,15 @@ function executeInitAndContentHooks() {
13610
12544
  if (!checkNoChangesMode) {
13611
12545
  var tView = currentView.tView;
13612
12546
  executeInitHooks(currentView, tView, creationMode);
13613
- executeHooks((directives), tView.contentHooks, tView.contentCheckHooks, creationMode);
12547
+ executeHooks(directives, tView.contentHooks, tView.contentCheckHooks, creationMode);
13614
12548
  }
13615
12549
  }
13616
12550
  function createLView(viewId, renderer, tView, template, context, flags) {
13617
12551
  var newView = {
13618
12552
  parent: currentView,
13619
12553
  id: viewId,
13620
- // -1 for component views
13621
12554
  flags: flags | 1 /* CreationMode */ | 8 /* Attached */,
13622
- node: (null),
13623
- // until we initialize it in createNode.
12555
+ node: null,
13624
12556
  data: [],
13625
12557
  directives: null,
13626
12558
  tView: tView,
@@ -13710,12 +12642,15 @@ function createLNode(index, type, native, state) {
13710
12642
  isParent = true;
13711
12643
  return node;
13712
12644
  }
12645
+ //////////////////////////
12646
+ //// Render
12647
+ //////////////////////////
13713
12648
  /**
13714
12649
  * Resets the application state.
13715
12650
  */
13716
12651
  function resetApplicationState() {
13717
12652
  isParent = false;
13718
- previousOrParentNode = (null);
12653
+ previousOrParentNode = null;
13719
12654
  }
13720
12655
  /**
13721
12656
  *
@@ -13734,7 +12669,7 @@ function renderEmbeddedTemplate(viewNode, template, context, renderer, directive
13734
12669
  var oldView;
13735
12670
  try {
13736
12671
  isParent = true;
13737
- previousOrParentNode = (null);
12672
+ previousOrParentNode = null;
13738
12673
  var rf = 2;
13739
12674
  if (viewNode == null) {
13740
12675
  var tView = getOrCreateTView(template, directives || null, pipes || null);
@@ -13748,7 +12683,7 @@ function renderEmbeddedTemplate(viewNode, template, context, renderer, directive
13748
12683
  refreshDynamicChildren();
13749
12684
  }
13750
12685
  finally {
13751
- leaveView((oldView));
12686
+ leaveView(oldView);
13752
12687
  isParent = _isParent;
13753
12688
  previousOrParentNode = _previousOrParentNode;
13754
12689
  }
@@ -13761,7 +12696,7 @@ function renderComponentOrTemplate(node, hostView, componentOrContext, template)
13761
12696
  rendererFactory.begin();
13762
12697
  }
13763
12698
  if (template) {
13764
- template(getRenderFlags(hostView), (componentOrContext));
12699
+ template(getRenderFlags(hostView), componentOrContext);
13765
12700
  refreshDynamicChildren();
13766
12701
  refreshDirectives();
13767
12702
  }
@@ -13793,6 +12728,9 @@ function getRenderFlags(view) {
13793
12728
  return view.flags & 1 /* CreationMode */ ? 1 /* Create */ | 2 /* Update */ :
13794
12729
  2 /* Update */;
13795
12730
  }
12731
+ //////////////////////////
12732
+ //// Element
12733
+ //////////////////////////
13796
12734
  /**
13797
12735
  * Create DOM element. The instruction must later be followed by `elementEnd()` call.
13798
12736
  *
@@ -13809,10 +12747,10 @@ function elementStart(index, name, attrs, localRefs) {
13809
12747
  ngDevMode &&
13810
12748
  assertEqual(currentView.bindingStartIndex, -1, 'elements should be created before any bindings');
13811
12749
  var native = renderer.createElement(name);
13812
- var node = createLNode(index, 3 /* Element */, (native), null);
12750
+ var node = createLNode(index, 3 /* Element */, native, null);
13813
12751
  if (attrs)
13814
12752
  setUpAttributes(native, attrs);
13815
- appendChild((node.parent), native, currentView);
12753
+ appendChild(node.parent, native, currentView);
13816
12754
  createDirectivesAndLocals(index, name, attrs, localRefs, null);
13817
12755
  return native;
13818
12756
  }
@@ -13855,7 +12793,7 @@ function findDirectiveMatches(tNode) {
13855
12793
  if (registry) {
13856
12794
  for (var i = 0; i < registry.length; i++) {
13857
12795
  var def = registry[i];
13858
- if (isNodeMatchingSelectorList(tNode, (def.selectors))) {
12796
+ if (isNodeMatchingSelectorList(tNode, def.selectors)) {
13859
12797
  if (def.template) {
13860
12798
  if (tNode.flags & 4096 /* isComponent */)
13861
12799
  throwMultipleComponentError(tNode);
@@ -13908,12 +12846,12 @@ function isComponent(tNode) {
13908
12846
  * This function instantiates the given directives.
13909
12847
  */
13910
12848
  function instantiateDirectivesDirectly() {
13911
- var tNode = (previousOrParentNode.tNode);
12849
+ var tNode = previousOrParentNode.tNode;
13912
12850
  var count = tNode.flags & 4095;
13913
12851
  if (count > 0) {
13914
12852
  var start = tNode.flags >> 13;
13915
12853
  var end = start + count;
13916
- var tDirectives = (currentView.tView.directives);
12854
+ var tDirectives = currentView.tView.directives;
13917
12855
  for (var i = start; i < end; i++) {
13918
12856
  var def = tDirectives[i];
13919
12857
  directiveCreate(i, def.factory(), def);
@@ -14082,7 +13020,7 @@ function listener(eventName, listenerFn, useCapture) {
14082
13020
  native.addEventListener(eventName, wrappedListener, useCapture);
14083
13021
  cleanupFns.push(eventName, native, wrappedListener, useCapture);
14084
13022
  }
14085
- var tNode = (node.tNode);
13023
+ var tNode = node.tNode;
14086
13024
  if (tNode.outputs === undefined) {
14087
13025
  // if we create TNode here, inputs must be undefined so we know they still need to be
14088
13026
  // checked
@@ -14100,7 +13038,7 @@ function listener(eventName, listenerFn, useCapture) {
14100
13038
  */
14101
13039
  function createOutput(outputs, listener) {
14102
13040
  for (var i = 0; i < outputs.length; i += 2) {
14103
- ngDevMode && assertDataInRange(outputs[i], (directives));
13041
+ ngDevMode && assertDataInRange(outputs[i], directives);
14104
13042
  var subscription = directives[outputs[i]][outputs[i + 1]].subscribe(listener);
14105
13043
  cleanup.push(subscription.unsubscribe, subscription);
14106
13044
  }
@@ -14112,7 +13050,7 @@ function elementEnd() {
14112
13050
  }
14113
13051
  else {
14114
13052
  ngDevMode && assertHasParent();
14115
- previousOrParentNode = (previousOrParentNode.parent);
13053
+ previousOrParentNode = previousOrParentNode.parent;
14116
13054
  }
14117
13055
  ngDevMode && assertNodeType(previousOrParentNode, 3 /* Element */);
14118
13056
  var queries = previousOrParentNode.queries;
@@ -14159,7 +13097,7 @@ function elementProperty(index, propName, value, sanitizer) {
14159
13097
  if (value === NO_CHANGE)
14160
13098
  return;
14161
13099
  var node = data[index];
14162
- var tNode = (node.tNode);
13100
+ var tNode = node.tNode;
14163
13101
  // if tNode.inputs is undefined, a listener has created outputs, but inputs haven't
14164
13102
  // yet been checked
14165
13103
  if (tNode && tNode.inputs === undefined) {
@@ -14209,7 +13147,7 @@ function createTNode(tagName, attrs, data) {
14209
13147
  */
14210
13148
  function setInputsForProperty(inputs, value) {
14211
13149
  for (var i = 0; i < inputs.length; i += 2) {
14212
- ngDevMode && assertDataInRange(inputs[i], (directives));
13150
+ ngDevMode && assertDataInRange(inputs[i], directives);
14213
13151
  directives[inputs[i]][inputs[i + 1]] = value;
14214
13152
  }
14215
13153
  }
@@ -14227,7 +13165,7 @@ function generatePropertyAliases(tNodeFlags, direction) {
14227
13165
  var start = tNodeFlags >> 13;
14228
13166
  var end = start + count;
14229
13167
  var isInput = direction === 0;
14230
- var defs = (currentView.tView.directives);
13168
+ var defs = currentView.tView.directives;
14231
13169
  for (var i = start; i < end; i++) {
14232
13170
  var directiveDef = defs[i];
14233
13171
  var propertyAliasMap = isInput ? directiveDef.inputs : directiveDef.outputs;
@@ -14339,6 +13277,9 @@ function elementStyle(index, value) {
14339
13277
  }
14340
13278
  }
14341
13279
  }
13280
+ //////////////////////////
13281
+ //// Text
13282
+ //////////////////////////
14342
13283
  /**
14343
13284
  * Create static text node
14344
13285
  *
@@ -14353,7 +13294,7 @@ function text(index, value) {
14353
13294
  var node = createLNode(index, 3 /* Element */, textNode);
14354
13295
  // Text nodes are self closing.
14355
13296
  isParent = false;
14356
- appendChild((node.parent), textNode, currentView);
13297
+ appendChild(node.parent, textNode, currentView);
14357
13298
  }
14358
13299
  /**
14359
13300
  * Create text node with binding
@@ -14378,6 +13319,9 @@ function textBinding(index, value) {
14378
13319
  insertChild(existingNode, currentView);
14379
13320
  }
14380
13321
  }
13322
+ //////////////////////////
13323
+ //// Directive
13324
+ //////////////////////////
14381
13325
  /**
14382
13326
  * Create a directive.
14383
13327
  *
@@ -14436,9 +13380,6 @@ function baseDirectiveCreate(index, directive, directiveDef) {
14436
13380
  if (firstTemplatePass) {
14437
13381
  var flags = previousOrParentNode.tNode.flags;
14438
13382
  if ((flags & 4095 /* DirectiveCountMask */) === 0) {
14439
- // When the first directive is created:
14440
- // - save the index,
14441
- // - set the number of directives to 1
14442
13383
  // When the first directive is created:
14443
13384
  // - save the index,
14444
13385
  // - set the number of directives to 1
@@ -14454,7 +13395,7 @@ function baseDirectiveCreate(index, directive, directiveDef) {
14454
13395
  else {
14455
13396
  var diPublic = directiveDef.diPublic;
14456
13397
  if (diPublic)
14457
- diPublic((directiveDef));
13398
+ diPublic(directiveDef);
14458
13399
  }
14459
13400
  if (directiveDef.attributes != null && previousOrParentNode.type == 3 /* Element */) {
14460
13401
  setUpAttributes(previousOrParentNode.native, directiveDef.attributes);
@@ -14499,7 +13440,7 @@ function setInputsFromAttrs(directiveIndex, instance, inputs, tNode) {
14499
13440
  function generateInitialInputs(directiveIndex, inputs, tNode) {
14500
13441
  var initialInputData = tNode.initialInputs || (tNode.initialInputs = []);
14501
13442
  initialInputData[directiveIndex] = null;
14502
- var attrs = (tNode.attrs);
13443
+ var attrs = tNode.attrs;
14503
13444
  for (var i = 0; i < attrs.length; i += 2) {
14504
13445
  var attrName = attrs[i];
14505
13446
  var minifiedInputName = inputs[attrName];
@@ -14510,6 +13451,9 @@ function generateInitialInputs(directiveIndex, inputs, tNode) {
14510
13451
  }
14511
13452
  return initialInputData;
14512
13453
  }
13454
+ //////////////////////////
13455
+ //// ViewContainer & View
13456
+ //////////////////////////
14513
13457
  function createLContainer(parentLNode, currentView, template) {
14514
13458
  ngDevMode && assertNotNull(parentLNode, 'containers should have a parent');
14515
13459
  return {
@@ -14585,7 +13529,7 @@ function containerRefreshEnd() {
14585
13529
  else {
14586
13530
  ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);
14587
13531
  ngDevMode && assertHasParent();
14588
- previousOrParentNode = (previousOrParentNode.parent);
13532
+ previousOrParentNode = previousOrParentNode.parent;
14589
13533
  }
14590
13534
  ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);
14591
13535
  var container = previousOrParentNode;
@@ -14604,7 +13548,7 @@ function refreshDynamicChildren() {
14604
13548
  for (var i = 0; i < container_1.views.length; i++) {
14605
13549
  var view = container_1.views[i];
14606
13550
  // The directives and pipes are not needed here as an existing view is only being refreshed.
14607
- renderEmbeddedTemplate(view, (view.data.template), (view.data.context), renderer);
13551
+ renderEmbeddedTemplate(view, view.data.template, view.data.context, renderer);
14608
13552
  }
14609
13553
  }
14610
13554
  }
@@ -14705,7 +13649,7 @@ function embeddedViewEnd() {
14705
13649
  }
14706
13650
  lContainer.nextIndex++;
14707
13651
  }
14708
- leaveView((currentView.parent));
13652
+ leaveView(currentView.parent);
14709
13653
  ngDevMode && assertEqual(isParent, false, 'isParent');
14710
13654
  ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);
14711
13655
  }
@@ -14733,6 +13677,7 @@ function setRenderParentInProjectedNodes(renderParent, viewNode) {
14733
13677
  }
14734
13678
  }
14735
13679
  }
13680
+ /////////////
14736
13681
  /**
14737
13682
  * Refreshes components by entering the component view and processing its bindings, queries, etc.
14738
13683
  *
@@ -14744,10 +13689,10 @@ function componentRefresh(directiveIndex, elementIndex) {
14744
13689
  var element = data[elementIndex];
14745
13690
  ngDevMode && assertNodeType(element, 3 /* Element */);
14746
13691
  ngDevMode && assertNotNull(element.data, "Component's host node should have an LView attached.");
14747
- var hostView = (element.data);
13692
+ var hostView = element.data;
14748
13693
  // Only attached CheckAlways components or attached, dirty OnPush components should be checked
14749
13694
  if (viewAttached(hostView) && hostView.flags & (2 /* CheckAlways */ | 4 /* Dirty */)) {
14750
- ngDevMode && assertDataInRange(directiveIndex, (directives));
13695
+ ngDevMode && assertDataInRange(directiveIndex, directives);
14751
13696
  var def = currentView.tView.directives[directiveIndex];
14752
13697
  detectChangesInternal(hostView, element, def, getDirectiveInstance(directives[directiveIndex]));
14753
13698
  }
@@ -14790,7 +13735,7 @@ function projectionDef(index, selectors, textSelectors) {
14790
13735
  // - there are selectors defined
14791
13736
  // - a node has a tag name / attributes that can be matched
14792
13737
  if (selectors && componentChild.tNode) {
14793
- var matchedIdx = matchingSelectorIndex(componentChild.tNode, selectors, (textSelectors));
13738
+ var matchedIdx = matchingSelectorIndex(componentChild.tNode, selectors, textSelectors);
14794
13739
  distributedNodes[matchedIdx].push(componentChild);
14795
13740
  }
14796
13741
  else {
@@ -14877,7 +13822,7 @@ function findComponentHost(lView) {
14877
13822
  var viewRootLNode = lView.node;
14878
13823
  while (viewRootLNode.type === 2 /* View */) {
14879
13824
  ngDevMode && assertNotNull(lView.parent, 'lView.parent');
14880
- lView = (lView.parent);
13825
+ lView = lView.parent;
14881
13826
  viewRootLNode = lView.node;
14882
13827
  }
14883
13828
  ngDevMode && assertNodeType(viewRootLNode, 3 /* Element */);
@@ -14899,6 +13844,9 @@ function addToViewTree(currentView, state) {
14899
13844
  currentView.tail = state;
14900
13845
  return state;
14901
13846
  }
13847
+ ///////////////////////////////
13848
+ //// Change detection
13849
+ ///////////////////////////////
14902
13850
  /** If node is an OnPush component, marks its LView dirty. */
14903
13851
  function markDirtyIfOnPush(node) {
14904
13852
  // Because data flows down the component tree, ancestors do not need to be marked dirty
@@ -15210,7 +14158,7 @@ function load(index) {
15210
14158
  /** Retrieves a value from the `directives` array. */
15211
14159
  function loadDirective(index) {
15212
14160
  ngDevMode && assertNotNull(directives, 'Directives array should be defined if reading a dir.');
15213
- ngDevMode && assertDataInRange(index, (directives));
14161
+ ngDevMode && assertDataInRange(index, directives);
15214
14162
  return directives[index];
15215
14163
  }
15216
14164
  /** Gets the current binding value and increments the binding index. */
@@ -15294,12 +14242,10 @@ var ROOT_DIRECTIVE_INDICES = _ROOT_DIRECTIVE_INDICES;
15294
14242
  var ViewRef$1 = /** @class */ (function () {
15295
14243
  function ViewRef(_view, context) {
15296
14244
  this._view = _view;
15297
- this.context = (context);
14245
+ this.context = context;
15298
14246
  }
15299
14247
  /** @internal */
15300
- /** @internal */
15301
- ViewRef.prototype._setComponentContext = /** @internal */
15302
- function (view, context) {
14248
+ ViewRef.prototype._setComponentContext = function (view, context) {
15303
14249
  this._view = view;
15304
14250
  this.context = context;
15305
14251
  };
@@ -15317,7 +14263,8 @@ var ViewRef$1 = /** @class */ (function () {
15317
14263
  *
15318
14264
  * <!-- TODO: Add a link to a chapter on OnPush components -->
15319
14265
  *
15320
- * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))
14266
+ * @usageNotes
14267
+ * ### Example
15321
14268
  *
15322
14269
  * ```typescript
15323
14270
  * @Component({
@@ -15338,73 +14285,7 @@ var ViewRef$1 = /** @class */ (function () {
15338
14285
  * }
15339
14286
  * ```
15340
14287
  */
15341
- /**
15342
- * Marks a view and all of its ancestors dirty.
15343
- *
15344
- * It also triggers change detection by calling `scheduleTick` internally, which coalesces
15345
- * multiple `markForCheck` calls to into one change detection run.
15346
- *
15347
- * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
15348
- * checked when it needs to be re-rendered but the two normal triggers haven't marked it
15349
- * dirty (i.e. inputs haven't changed and events haven't fired in the view).
15350
- *
15351
- * <!-- TODO: Add a link to a chapter on OnPush components -->
15352
- *
15353
- * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))
15354
- *
15355
- * ```typescript
15356
- * @Component({
15357
- * selector: 'my-app',
15358
- * template: `Number of ticks: {{numberOfTicks}}`
15359
- * changeDetection: ChangeDetectionStrategy.OnPush,
15360
- * })
15361
- * class AppComponent {
15362
- * numberOfTicks = 0;
15363
- *
15364
- * constructor(private ref: ChangeDetectorRef) {
15365
- * setInterval(() => {
15366
- * this.numberOfTicks++;
15367
- * // the following is required, otherwise the view will not be updated
15368
- * this.ref.markForCheck();
15369
- * }, 1000);
15370
- * }
15371
- * }
15372
- * ```
15373
- */
15374
- ViewRef.prototype.markForCheck = /**
15375
- * Marks a view and all of its ancestors dirty.
15376
- *
15377
- * It also triggers change detection by calling `scheduleTick` internally, which coalesces
15378
- * multiple `markForCheck` calls to into one change detection run.
15379
- *
15380
- * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
15381
- * checked when it needs to be re-rendered but the two normal triggers haven't marked it
15382
- * dirty (i.e. inputs haven't changed and events haven't fired in the view).
15383
- *
15384
- * <!-- TODO: Add a link to a chapter on OnPush components -->
15385
- *
15386
- * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))
15387
- *
15388
- * ```typescript
15389
- * @Component({
15390
- * selector: 'my-app',
15391
- * template: `Number of ticks: {{numberOfTicks}}`
15392
- * changeDetection: ChangeDetectionStrategy.OnPush,
15393
- * })
15394
- * class AppComponent {
15395
- * numberOfTicks = 0;
15396
- *
15397
- * constructor(private ref: ChangeDetectorRef) {
15398
- * setInterval(() => {
15399
- * this.numberOfTicks++;
15400
- * // the following is required, otherwise the view will not be updated
15401
- * this.ref.markForCheck();
15402
- * }, 1000);
15403
- * }
15404
- * }
15405
- * ```
15406
- */
15407
- function () { markViewDirty(this._view); };
14288
+ ViewRef.prototype.markForCheck = function () { markViewDirty(this._view); };
15408
14289
  /**
15409
14290
  * Detaches the view from the change detection tree.
15410
14291
  *
@@ -15416,6 +14297,7 @@ var ViewRef$1 = /** @class */ (function () {
15416
14297
  * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
15417
14298
  * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
15418
14299
  *
14300
+ * @usageNotes
15419
14301
  * ### Example
15420
14302
  *
15421
14303
  * The following example defines a component with a large list of readonly data.
@@ -15457,111 +14339,7 @@ var ViewRef$1 = /** @class */ (function () {
15457
14339
  * }
15458
14340
  * ```
15459
14341
  */
15460
- /**
15461
- * Detaches the view from the change detection tree.
15462
- *
15463
- * Detached views will not be checked during change detection runs until they are
15464
- * re-attached, even if they are dirty. `detach` can be used in combination with
15465
- * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
15466
- * detection checks.
15467
- *
15468
- * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
15469
- * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
15470
- *
15471
- * ### Example
15472
- *
15473
- * The following example defines a component with a large list of readonly data.
15474
- * Imagine the data changes constantly, many times per second. For performance reasons,
15475
- * we want to check and update the list every five seconds. We can do that by detaching
15476
- * the component's change detector and doing a local check every five seconds.
15477
- *
15478
- * ```typescript
15479
- * class DataProvider {
15480
- * // in a real application the returned data will be different every time
15481
- * get data() {
15482
- * return [1,2,3,4,5];
15483
- * }
15484
- * }
15485
- *
15486
- * @Component({
15487
- * selector: 'giant-list',
15488
- * template: `
15489
- * <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
15490
- * `,
15491
- * })
15492
- * class GiantList {
15493
- * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
15494
- * ref.detach();
15495
- * setInterval(() => {
15496
- * this.ref.detectChanges();
15497
- * }, 5000);
15498
- * }
15499
- * }
15500
- *
15501
- * @Component({
15502
- * selector: 'app',
15503
- * providers: [DataProvider],
15504
- * template: `
15505
- * <giant-list><giant-list>
15506
- * `,
15507
- * })
15508
- * class App {
15509
- * }
15510
- * ```
15511
- */
15512
- ViewRef.prototype.detach = /**
15513
- * Detaches the view from the change detection tree.
15514
- *
15515
- * Detached views will not be checked during change detection runs until they are
15516
- * re-attached, even if they are dirty. `detach` can be used in combination with
15517
- * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
15518
- * detection checks.
15519
- *
15520
- * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
15521
- * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
15522
- *
15523
- * ### Example
15524
- *
15525
- * The following example defines a component with a large list of readonly data.
15526
- * Imagine the data changes constantly, many times per second. For performance reasons,
15527
- * we want to check and update the list every five seconds. We can do that by detaching
15528
- * the component's change detector and doing a local check every five seconds.
15529
- *
15530
- * ```typescript
15531
- * class DataProvider {
15532
- * // in a real application the returned data will be different every time
15533
- * get data() {
15534
- * return [1,2,3,4,5];
15535
- * }
15536
- * }
15537
- *
15538
- * @Component({
15539
- * selector: 'giant-list',
15540
- * template: `
15541
- * <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
15542
- * `,
15543
- * })
15544
- * class GiantList {
15545
- * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
15546
- * ref.detach();
15547
- * setInterval(() => {
15548
- * this.ref.detectChanges();
15549
- * }, 5000);
15550
- * }
15551
- * }
15552
- *
15553
- * @Component({
15554
- * selector: 'app',
15555
- * providers: [DataProvider],
15556
- * template: `
15557
- * <giant-list><giant-list>
15558
- * `,
15559
- * })
15560
- * class App {
15561
- * }
15562
- * ```
15563
- */
15564
- function () { this._view.flags &= ~8 /* Attached */; };
14342
+ ViewRef.prototype.detach = function () { this._view.flags &= ~8 /* Attached */; };
15565
14343
  /**
15566
14344
  * Re-attaches a view to the change detection tree.
15567
14345
  *
@@ -15570,7 +14348,8 @@ var ViewRef$1 = /** @class */ (function () {
15570
14348
  *
15571
14349
  * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
15572
14350
  *
15573
- * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))
14351
+ * @usageNotes
14352
+ * ### Example
15574
14353
  *
15575
14354
  * The following example creates a component displaying `live` data. The component will detach
15576
14355
  * its change detector from the main change detector tree when the component's live property
@@ -15617,117 +14396,7 @@ var ViewRef$1 = /** @class */ (function () {
15617
14396
  * }
15618
14397
  * ```
15619
14398
  */
15620
- /**
15621
- * Re-attaches a view to the change detection tree.
15622
- *
15623
- * This can be used to re-attach views that were previously detached from the tree
15624
- * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
15625
- *
15626
- * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
15627
- *
15628
- * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))
15629
- *
15630
- * The following example creates a component displaying `live` data. The component will detach
15631
- * its change detector from the main change detector tree when the component's live property
15632
- * is set to false.
15633
- *
15634
- * ```typescript
15635
- * class DataProvider {
15636
- * data = 1;
15637
- *
15638
- * constructor() {
15639
- * setInterval(() => {
15640
- * this.data = this.data * 2;
15641
- * }, 500);
15642
- * }
15643
- * }
15644
- *
15645
- * @Component({
15646
- * selector: 'live-data',
15647
- * inputs: ['live'],
15648
- * template: 'Data: {{dataProvider.data}}'
15649
- * })
15650
- * class LiveData {
15651
- * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
15652
- *
15653
- * set live(value) {
15654
- * if (value) {
15655
- * this.ref.reattach();
15656
- * } else {
15657
- * this.ref.detach();
15658
- * }
15659
- * }
15660
- * }
15661
- *
15662
- * @Component({
15663
- * selector: 'my-app',
15664
- * providers: [DataProvider],
15665
- * template: `
15666
- * Live Update: <input type="checkbox" [(ngModel)]="live">
15667
- * <live-data [live]="live"><live-data>
15668
- * `,
15669
- * })
15670
- * class AppComponent {
15671
- * live = true;
15672
- * }
15673
- * ```
15674
- */
15675
- ViewRef.prototype.reattach = /**
15676
- * Re-attaches a view to the change detection tree.
15677
- *
15678
- * This can be used to re-attach views that were previously detached from the tree
15679
- * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
15680
- *
15681
- * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
15682
- *
15683
- * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))
15684
- *
15685
- * The following example creates a component displaying `live` data. The component will detach
15686
- * its change detector from the main change detector tree when the component's live property
15687
- * is set to false.
15688
- *
15689
- * ```typescript
15690
- * class DataProvider {
15691
- * data = 1;
15692
- *
15693
- * constructor() {
15694
- * setInterval(() => {
15695
- * this.data = this.data * 2;
15696
- * }, 500);
15697
- * }
15698
- * }
15699
- *
15700
- * @Component({
15701
- * selector: 'live-data',
15702
- * inputs: ['live'],
15703
- * template: 'Data: {{dataProvider.data}}'
15704
- * })
15705
- * class LiveData {
15706
- * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
15707
- *
15708
- * set live(value) {
15709
- * if (value) {
15710
- * this.ref.reattach();
15711
- * } else {
15712
- * this.ref.detach();
15713
- * }
15714
- * }
15715
- * }
15716
- *
15717
- * @Component({
15718
- * selector: 'my-app',
15719
- * providers: [DataProvider],
15720
- * template: `
15721
- * Live Update: <input type="checkbox" [(ngModel)]="live">
15722
- * <live-data [live]="live"><live-data>
15723
- * `,
15724
- * })
15725
- * class AppComponent {
15726
- * live = true;
15727
- * }
15728
- * ```
15729
- */
15730
- function () { this._view.flags |= 8 /* Attached */; };
14399
+ ViewRef.prototype.reattach = function () { this._view.flags |= 8 /* Attached */; };
15731
14400
  /**
15732
14401
  * Checks the view and its children.
15733
14402
  *
@@ -15737,6 +14406,7 @@ var ViewRef$1 = /** @class */ (function () {
15737
14406
  * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
15738
14407
  * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
15739
14408
  *
14409
+ * @usageNotes
15740
14410
  * ### Example
15741
14411
  *
15742
14412
  * The following example defines a component with a large list of readonly data.
@@ -15748,66 +14418,14 @@ var ViewRef$1 = /** @class */ (function () {
15748
14418
  *
15749
14419
  * See {@link ChangeDetectorRef#detach detach} for more information.
15750
14420
  */
15751
- /**
15752
- * Checks the view and its children.
15753
- *
15754
- * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
15755
- * local change detection checks.
15756
- *
15757
- * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
15758
- * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
15759
- *
15760
- * ### Example
15761
- *
15762
- * The following example defines a component with a large list of readonly data.
15763
- * Imagine, the data changes constantly, many times per second. For performance reasons,
15764
- * we want to check and update the list every five seconds.
15765
- *
15766
- * We can do that by detaching the component's change detector and doing a local change detection
15767
- * check every five seconds.
15768
- *
15769
- * See {@link ChangeDetectorRef#detach detach} for more information.
15770
- */
15771
- ViewRef.prototype.detectChanges = /**
15772
- * Checks the view and its children.
15773
- *
15774
- * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
15775
- * local change detection checks.
15776
- *
15777
- * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
15778
- * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
15779
- *
15780
- * ### Example
15781
- *
15782
- * The following example defines a component with a large list of readonly data.
15783
- * Imagine, the data changes constantly, many times per second. For performance reasons,
15784
- * we want to check and update the list every five seconds.
15785
- *
15786
- * We can do that by detaching the component's change detector and doing a local change detection
15787
- * check every five seconds.
15788
- *
15789
- * See {@link ChangeDetectorRef#detach detach} for more information.
15790
- */
15791
- function () { detectChanges(this.context); };
14421
+ ViewRef.prototype.detectChanges = function () { detectChanges(this.context); };
15792
14422
  /**
15793
14423
  * Checks the change detector and its children, and throws if any changes are detected.
15794
14424
  *
15795
14425
  * This is used in development mode to verify that running change detection doesn't
15796
14426
  * introduce other changes.
15797
14427
  */
15798
- /**
15799
- * Checks the change detector and its children, and throws if any changes are detected.
15800
- *
15801
- * This is used in development mode to verify that running change detection doesn't
15802
- * introduce other changes.
15803
- */
15804
- ViewRef.prototype.checkNoChanges = /**
15805
- * Checks the change detector and its children, and throws if any changes are detected.
15806
- *
15807
- * This is used in development mode to verify that running change detection doesn't
15808
- * introduce other changes.
15809
- */
15810
- function () { checkNoChanges(this.context); };
14428
+ ViewRef.prototype.checkNoChanges = function () { checkNoChanges(this.context); };
15811
14429
  return ViewRef;
15812
14430
  }());
15813
14431
  var EmbeddedViewRef$1 = /** @class */ (function (_super) {
@@ -15827,7 +14445,7 @@ var EmbeddedViewRef$1 = /** @class */ (function (_super) {
15827
14445
  */
15828
14446
  function createViewRef(view, context) {
15829
14447
  // TODO: add detectChanges back in when implementing ChangeDetectorRef.detectChanges
15830
- return addDestroyable(new ViewRef$1((view), context));
14448
+ return addDestroyable(new ViewRef$1(view, context));
15831
14449
  }
15832
14450
  /**
15833
14451
  * Decorates an object with destroy logic (implementing the DestroyRef interface)
@@ -15889,13 +14507,13 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
15889
14507
  var hostNode = locateHostElement(rendererFactory, opts.host || componentTag);
15890
14508
  var rootContext = {
15891
14509
  // Incomplete initialization due to circular reference.
15892
- component: (null),
14510
+ component: null,
15893
14511
  scheduler: opts.scheduler || requestAnimationFrame.bind(window),
15894
14512
  clean: CLEAN_PROMISE,
15895
14513
  };
15896
14514
  var rootView = createLView(-1, rendererFactory.createRenderer(hostNode, componentDef.rendererType), createTView(null, null), null, rootContext, componentDef.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */);
15897
14515
  rootView.injector = opts.injector || null;
15898
- var oldView = enterView(rootView, (null));
14516
+ var oldView = enterView(rootView, null);
15899
14517
  var elementNode;
15900
14518
  try {
15901
14519
  if (rendererFactory.begin)
@@ -15903,8 +14521,9 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
15903
14521
  // Create element node at index 0 in data array
15904
14522
  elementNode = hostElement(componentTag, hostNode, componentDef);
15905
14523
  // Create directive instance with factory() and store at index 0 in directives array
15906
- component = rootContext.component = baseDirectiveCreate(0, componentDef.factory(), componentDef);
15907
- initChangeDetectorIfExisting(elementNode.nodeInjector, component, (elementNode.data));
14524
+ component = rootContext.component =
14525
+ baseDirectiveCreate(0, componentDef.factory(), componentDef);
14526
+ initChangeDetectorIfExisting(elementNode.nodeInjector, component, elementNode.data);
15908
14527
  opts.hostFeatures && opts.hostFeatures.forEach(function (feature) { return feature(component, componentDef); });
15909
14528
  executeInitAndContentHooks();
15910
14529
  setHostBindings(ROOT_DIRECTIVE_INDICES);
@@ -16164,7 +14783,7 @@ function injectAttribute(attrName) {
16164
14783
  ngDevMode && assertPreviousIsParent();
16165
14784
  var lElement = getPreviousOrParentNode();
16166
14785
  ngDevMode && assertNodeType(lElement, 3 /* Element */);
16167
- var tElement = (lElement.tNode);
14786
+ var tElement = lElement.tNode;
16168
14787
  ngDevMode && assertNotNull(tElement, 'expecting tNode');
16169
14788
  var attrs = tElement.attrs;
16170
14789
  if (attrs) {
@@ -16186,7 +14805,7 @@ function getOrCreateChangeDetectorRef(di, context) {
16186
14805
  if (di.changeDetectorRef)
16187
14806
  return di.changeDetectorRef;
16188
14807
  var currentNode = di.node;
16189
- if (isComponent((currentNode.tNode))) {
14808
+ if (isComponent(currentNode.tNode)) {
16190
14809
  return di.changeDetectorRef = createViewRef(currentNode.data, context);
16191
14810
  }
16192
14811
  else if (currentNode.type === 3 /* Element */) {
@@ -16265,7 +14884,7 @@ function getOrCreateInjectable(di, token, flags) {
16265
14884
  if (count !== 0) {
16266
14885
  var start = flags_1 >> 13;
16267
14886
  var end = start + count;
16268
- var defs = (node.view.tView.directives);
14887
+ var defs = node.view.tView.directives;
16269
14888
  for (var i = start; i < end; i++) {
16270
14889
  // Get the definition for the directive at this index and, if it is injectable (diPublic),
16271
14890
  // and matches the given token, return the directive instance.
@@ -16416,8 +15035,8 @@ function getOrCreateContainerRef(di) {
16416
15035
  if (!di.viewContainerRef) {
16417
15036
  var vcRefHost = di.node;
16418
15037
  ngDevMode && assertNodeOfPossibleTypes(vcRefHost, 0 /* Container */, 3 /* Element */);
16419
- var lContainer = createLContainer((vcRefHost.parent), vcRefHost.view);
16420
- var lContainerNode = createLNodeObject(0 /* Container */, vcRefHost.view, (vcRefHost.parent), undefined, lContainer, null);
15038
+ var lContainer = createLContainer(vcRefHost.parent, vcRefHost.view);
15039
+ var lContainerNode = createLNodeObject(0 /* Container */, vcRefHost.view, vcRefHost.parent, undefined, lContainer, null);
16421
15040
  vcRefHost.dynamicLContainerNode = lContainerNode;
16422
15041
  addToViewTree(vcRefHost.view, lContainer);
16423
15042
  di.viewContainerRef = new ViewContainerRef$1(lContainerNode);
@@ -16521,7 +15140,7 @@ function getOrCreateTemplateRef(di) {
16521
15140
  ngDevMode && assertNodeType(di.node, 0 /* Container */);
16522
15141
  var data = di.node.data;
16523
15142
  var tView = di.node.view.tView;
16524
- return di.templateRef || (di.templateRef = new TemplateRef$1(getOrCreateElementRef(di), (data.template), getRenderer(), tView.directiveRegistry, tView.pipeRegistry));
15143
+ return di.templateRef || (di.templateRef = new TemplateRef$1(getOrCreateElementRef(di), data.template, getRenderer(), tView.directiveRegistry, tView.pipeRegistry));
16525
15144
  }
16526
15145
  var TemplateRef$1 = /** @class */ (function () {
16527
15146
  function TemplateRef(elementRef, template, _renderer, _directives, _pipes) {
@@ -16562,13 +15181,13 @@ var TemplateRef$1 = /** @class */ (function () {
16562
15181
  */
16563
15182
  function defineComponent(componentDefinition) {
16564
15183
  var type = componentDefinition.type;
16565
- var pipeTypes = (componentDefinition.pipes);
16566
- var directiveTypes = (componentDefinition.directives);
15184
+ var pipeTypes = componentDefinition.pipes;
15185
+ var directiveTypes = componentDefinition.directives;
16567
15186
  var def = {
16568
15187
  type: type,
16569
15188
  diPublic: null,
16570
15189
  factory: componentDefinition.factory,
16571
- template: componentDefinition.template || (null),
15190
+ template: componentDefinition.template || null,
16572
15191
  hostBindings: componentDefinition.hostBindings || null,
16573
15192
  attributes: componentDefinition.attributes || null,
16574
15193
  inputs: invertObject(componentDefinition.inputs),
@@ -16584,10 +15203,8 @@ function defineComponent(componentDefinition) {
16584
15203
  onDestroy: type.prototype.ngOnDestroy || null,
16585
15204
  onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,
16586
15205
  directiveDefs: directiveTypes ?
16587
- function () {
16588
- return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)
16589
- .map(extractDirectiveDef);
16590
- } :
15206
+ function () { return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)
15207
+ .map(extractDirectiveDef); } :
16591
15208
  null,
16592
15209
  pipeDefs: pipeTypes ?
16593
15210
  function () { return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef); } :
@@ -17189,7 +15806,7 @@ function getIdxOfMatchingSelector(tNode, selector) {
17189
15806
  * @returns Index of a found directive or null when none found.
17190
15807
  */
17191
15808
  function getIdxOfMatchingDirective(node, type) {
17192
- var defs = (node.view.tView.directives);
15809
+ var defs = node.view.tView.directives;
17193
15810
  var flags = node.tNode.flags;
17194
15811
  var count = flags & 4095;
17195
15812
  var start = flags >> 13;
@@ -17231,15 +15848,15 @@ function add(query, node) {
17231
15848
  }
17232
15849
  }
17233
15850
  else {
17234
- var selector = (predicate.selector);
15851
+ var selector = predicate.selector;
17235
15852
  for (var i = 0; i < selector.length; i++) {
17236
15853
  ngDevMode && assertNotNull(node.tNode, 'node.tNode');
17237
- var directiveIdx = getIdxOfMatchingSelector((node.tNode), selector[i]);
15854
+ var directiveIdx = getIdxOfMatchingSelector(node.tNode, selector[i]);
17238
15855
  if (directiveIdx !== null) {
17239
15856
  // a node is matching a predicate - determine what to read
17240
15857
  // note that queries using name selector must specify read strategy
17241
15858
  ngDevMode && assertNotNull(predicate.read, 'the node should have a predicate');
17242
- var result = readFromNodeInjector(nodeInjector, node, (predicate.read), directiveIdx);
15859
+ var result = readFromNodeInjector(nodeInjector, node, predicate.read, directiveIdx);
17243
15860
  if (result !== null) {
17244
15861
  addMatch(query, result);
17245
15862
  }
@@ -17302,86 +15919,38 @@ var QueryList_ = /** @class */ (function () {
17302
15919
  * See
17303
15920
  * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
17304
15921
  */
17305
- /**
17306
- * See
17307
- * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
17308
- */
17309
- QueryList_.prototype.map = /**
17310
- * See
17311
- * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
17312
- */
17313
- function (fn) { return this._values.map(fn); };
15922
+ QueryList_.prototype.map = function (fn) { return this._values.map(fn); };
17314
15923
  /**
17315
15924
  * See
17316
15925
  * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
17317
15926
  */
17318
- /**
17319
- * See
17320
- * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
17321
- */
17322
- QueryList_.prototype.filter = /**
17323
- * See
17324
- * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
17325
- */
17326
- function (fn) {
15927
+ QueryList_.prototype.filter = function (fn) {
17327
15928
  return this._values.filter(fn);
17328
15929
  };
17329
15930
  /**
17330
15931
  * See
17331
15932
  * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
17332
15933
  */
17333
- /**
17334
- * See
17335
- * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
17336
- */
17337
- QueryList_.prototype.find = /**
17338
- * See
17339
- * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
17340
- */
17341
- function (fn) {
15934
+ QueryList_.prototype.find = function (fn) {
17342
15935
  return this._values.find(fn);
17343
15936
  };
17344
15937
  /**
17345
15938
  * See
17346
15939
  * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
17347
15940
  */
17348
- /**
17349
- * See
17350
- * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
17351
- */
17352
- QueryList_.prototype.reduce = /**
17353
- * See
17354
- * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
17355
- */
17356
- function (fn, init) {
15941
+ QueryList_.prototype.reduce = function (fn, init) {
17357
15942
  return this._values.reduce(fn, init);
17358
15943
  };
17359
15944
  /**
17360
15945
  * See
17361
15946
  * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
17362
15947
  */
17363
- /**
17364
- * See
17365
- * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
17366
- */
17367
- QueryList_.prototype.forEach = /**
17368
- * See
17369
- * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
17370
- */
17371
- function (fn) { this._values.forEach(fn); };
15948
+ QueryList_.prototype.forEach = function (fn) { this._values.forEach(fn); };
17372
15949
  /**
17373
15950
  * See
17374
15951
  * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
17375
15952
  */
17376
- /**
17377
- * See
17378
- * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
17379
- */
17380
- QueryList_.prototype.some = /**
17381
- * See
17382
- * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
17383
- */
17384
- function (fn) {
15953
+ QueryList_.prototype.some = function (fn) {
17385
15954
  return this._values.some(fn);
17386
15955
  };
17387
15956
  QueryList_.prototype.toArray = function () { return this._values.slice(0); };
@@ -17608,6 +16177,7 @@ function bypassSanitizationTrustString(trustedString, mode) {
17608
16177
  * Use of this source code is governed by an MIT-style license that can be
17609
16178
  * found in the LICENSE file at https://angular.io/license
17610
16179
  */
16180
+ // clang-format off
17611
16181
 
17612
16182
  // clang-format on
17613
16183
 
@@ -17626,6 +16196,11 @@ function bypassSanitizationTrustString(trustedString, mode) {
17626
16196
  * Use of this source code is governed by an MIT-style license that can be
17627
16197
  * found in the LICENSE file at https://angular.io/license
17628
16198
  */
16199
+ /**
16200
+ * @module
16201
+ * @description
16202
+ * Entry point from which you should import all public core APIs.
16203
+ */
17629
16204
 
17630
16205
  /**
17631
16206
  * @license
@@ -17634,6 +16209,11 @@ function bypassSanitizationTrustString(trustedString, mode) {
17634
16209
  * Use of this source code is governed by an MIT-style license that can be
17635
16210
  * found in the LICENSE file at https://angular.io/license
17636
16211
  */
16212
+ /**
16213
+ * @module
16214
+ * @description
16215
+ * Entry point for all public APIs of this package.
16216
+ */
17637
16217
 
17638
16218
  // This file only reexports content of the `src` folder. Keep it that way.
17639
16219
 
@@ -17644,6 +16224,10 @@ function bypassSanitizationTrustString(trustedString, mode) {
17644
16224
  * Use of this source code is governed by an MIT-style license that can be
17645
16225
  * found in the LICENSE file at https://angular.io/license
17646
16226
  */
16227
+ // This file is not used to build this module. It is only used during editing
16228
+ // by the TypeScript language service and during build for verification. `ngc`
16229
+ // replaces this file with production index.ts when it rewrites private symbol
16230
+ // names.
17647
16231
 
17648
16232
  /**
17649
16233
  * Generated bundle index. Do not edit.