2017-02-22 18:13:21 +00:00
|
|
|
<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>
|
2017-11-15 10:05:58 +05:30
|
|
|
<div *ngFor="let msg of logger.logs">{{msg}}</div>
|
2017-02-22 18:13:21 +00:00
|
|
|
</div>
|