@angular/core 6.0.6 → 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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v6.0.6
2
+ * @license Angular v6.0.7
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/fesm5/core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v6.0.6
2
+ * @license Angular v6.0.7
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -426,9 +426,7 @@ function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
426
426
  * found in the LICENSE file at https://angular.io/license
427
427
  */
428
428
  /**
429
- * Directive decorator and metadata.
430
- *
431
- * @Annotation
429
+ * Type of the Component metadata.
432
430
  */
433
431
  var Directive = makeDecorator('Directive', function (dir) {
434
432
  if (dir === void 0) { dir = {}; }
@@ -437,6 +435,89 @@ var Directive = makeDecorator('Directive', function (dir) {
437
435
  /**
438
436
  * Component decorator and metadata.
439
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.
520
+ *
440
521
  * @Annotation
441
522
  */
442
523
  var Component = makeDecorator('Component', function (c) {
@@ -444,37 +525,54 @@ var Component = makeDecorator('Component', function (c) {
444
525
  return (__assign({ changeDetection: ChangeDetectionStrategy.Default }, c));
445
526
  }, Directive);
446
527
  /**
447
- * Pipe decorator and metadata.
448
528
  *
449
- * Use the `@Pipe` annotation to declare that a given class is a pipe. A pipe
450
- * class must also implement `PipeTransform` interface.
451
- *
452
- * To use the pipe include a reference to the pipe class in
453
- * `NgModule.declarations`.
454
529
  *
455
530
  * @Annotation
456
531
  */
457
532
  var Pipe = makeDecorator('Pipe', function (p) { return (__assign({ pure: true }, p)); });
458
533
  /**
459
- * Input decorator and metadata.
460
534
  *
461
535
  * @Annotation
462
536
  */
463
537
  var Input = makePropDecorator('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
464
538
  /**
465
- * Output decorator and metadata.
466
539
  *
467
540
  * @Annotation
468
541
  */
469
542
  var Output = makePropDecorator('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });
470
543
  /**
471
- * HostBinding decorator and metadata.
472
544
  *
473
545
  * @Annotation
474
546
  */
475
547
  var HostBinding = makePropDecorator('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });
476
548
  /**
477
- * 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.
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
+ * ```
478
576
  *
479
577
  * @Annotation
480
578
  */
@@ -1388,10 +1486,10 @@ var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, fu
1388
1486
  * found in the LICENSE file at https://angular.io/license
1389
1487
  */
1390
1488
  /**
1391
- * Defines a schema that will allow:
1392
- * - any non-Angular elements with a `-` in their name,
1393
- * - any properties on elements with a `-` in their name which is the common rule for custom
1394
- * 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.
1395
1493
  *
1396
1494
  *
1397
1495
  */
@@ -1399,7 +1497,7 @@ var CUSTOM_ELEMENTS_SCHEMA = {
1399
1497
  name: 'custom-elements'
1400
1498
  };
1401
1499
  /**
1402
- * Defines a schema that will allow any property on any element.
1500
+ * Defines a schema that allows any property on any element.
1403
1501
  *
1404
1502
  * @experimental
1405
1503
  */
@@ -1407,12 +1505,17 @@ var NO_ERRORS_SCHEMA = {
1407
1505
  name: 'no-errors-schema'
1408
1506
  };
1409
1507
  /**
1410
- * NgModule decorator and metadata.
1411
- *
1508
+ * Decorator that marks the following class as an NgModule, and supplies
1509
+ * configuration metadata for it.
1412
1510
  *
1413
1511
  * @Annotation
1414
1512
  */
1415
- 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) {
1416
1519
  var imports = (metadata && metadata.imports) || [];
1417
1520
  if (metadata && metadata.exports) {
1418
1521
  imports = __spread(imports, [metadata.exports]);
@@ -1490,7 +1593,7 @@ var Version = /** @class */ (function () {
1490
1593
  }
1491
1594
  return Version;
1492
1595
  }());
1493
- var VERSION = new Version('6.0.6');
1596
+ var VERSION = new Version('6.0.7');
1494
1597
 
1495
1598
  /**
1496
1599
  * @license