mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The reference removed so that calling LoggerService clear() method behaves as intended in SpyComponent. PR Close #20395
16 lines
458 B
HTML
16 lines
458 B
HTML
<div class="parent">
|
|
<h2>Spy Directive</h2>
|
|
|
|
<input [(ngModel)]="newName" (keyup.enter)="addHero()">
|
|
<button (click)="addHero()">Add Hero</button>
|
|
<button (click)="reset()">Reset Heroes</button>
|
|
|
|
<p></p>
|
|
<!-- #docregion template -->
|
|
<div *ngFor="let hero of heroes" mySpy class="heroes">
|
|
{{hero}}
|
|
</div>
|
|
<!-- #enddocregion template -->
|
|
<h4>-- Spy Lifecycle Hook Log --</h4>
|
|
<div *ngFor="let msg of logger.logs">{{msg}}</div>
|
|
</div>
|