From 697fb769607793535db3f4c4646f0737db2ecefb Mon Sep 17 00:00:00 2001 From: Shavi Pathania Date: Wed, 15 Nov 2017 10:05:58 +0530 Subject: [PATCH] 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 --- .../examples/lifecycle-hooks/src/app/spy.component.html | 2 +- aio/content/examples/lifecycle-hooks/src/app/spy.component.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/aio/content/examples/lifecycle-hooks/src/app/spy.component.html b/aio/content/examples/lifecycle-hooks/src/app/spy.component.html index 782435b961..f7deae9448 100644 --- a/aio/content/examples/lifecycle-hooks/src/app/spy.component.html +++ b/aio/content/examples/lifecycle-hooks/src/app/spy.component.html @@ -12,5 +12,5 @@

-- Spy Lifecycle Hook Log --

-
{{msg}}
+
{{msg}}
diff --git a/aio/content/examples/lifecycle-hooks/src/app/spy.component.ts b/aio/content/examples/lifecycle-hooks/src/app/spy.component.ts index 74a0c39da1..08fc0ee8a0 100644 --- a/aio/content/examples/lifecycle-hooks/src/app/spy.component.ts +++ b/aio/content/examples/lifecycle-hooks/src/app/spy.component.ts @@ -15,10 +15,8 @@ import { LoggerService } from './logger.service'; export class SpyParentComponent { newName = 'Herbie'; heroes: string[] = ['Windstorm', 'Magneta']; - spyLog: string[]; - constructor(private logger: LoggerService) { - this.spyLog = logger.logs; + constructor(public logger: LoggerService) { } addHero() {