docs(aio): Removing reference to LoggerService property (#20369) (#20395)

The reference removed so that calling LoggerService clear() method
behaves as intended in SpyComponent.

PR Close #20395
This commit is contained in:
Shavi Pathania 2017-11-15 10:05:58 +05:30 committed by Miško Hevery
parent 0fedb57cb0
commit 697fb76960
2 changed files with 2 additions and 4 deletions

View File

@ -12,5 +12,5 @@
</div> </div>
<!-- #enddocregion template --> <!-- #enddocregion template -->
<h4>-- Spy Lifecycle Hook Log --</h4> <h4>-- Spy Lifecycle Hook Log --</h4>
<div *ngFor="let msg of spyLog">{{msg}}</div> <div *ngFor="let msg of logger.logs">{{msg}}</div>
</div> </div>

View File

@ -15,10 +15,8 @@ import { LoggerService } from './logger.service';
export class SpyParentComponent { export class SpyParentComponent {
newName = 'Herbie'; newName = 'Herbie';
heroes: string[] = ['Windstorm', 'Magneta']; heroes: string[] = ['Windstorm', 'Magneta'];
spyLog: string[];
constructor(private logger: LoggerService) { constructor(public logger: LoggerService) {
this.spyLog = logger.logs;
} }
addHero() { addHero() {