docs(lifecycle-hooks): change ngOnit references to ngOnInit

closes #1084
This commit is contained in:
Ken Dale 2016-04-13 18:42:43 -04:00 committed by Ward Bell
parent f2f5d9f9ae
commit 205cc28f25
1 changed files with 2 additions and 2 deletions

View File

@ -348,7 +348,7 @@ figure.image-display
img(src='/resources/images/devguide/lifecycle-hooks/spy-directive.gif' alt="Spy Directive")
:marked
Adding a hero results in a new hero `<div>`. The spy's `ngOnit` logs that event.
Adding a hero results in a new hero `<div>`. The spy's `ngOnInit` logs that event.
We see a new entry for each hero.
The *Reset* button clears the `heroes` list.
@ -374,7 +374,7 @@ figure.image-display
Constructors should do no more than set the initial local variables to simple values.
When a component must start working _soon_ after creation,
we can count on Angular to call the `ngOnit` method to jumpstart it.
we can count on Angular to call the `ngOnInit` method to jumpstart it.
That's where the heavy initialization logic belongs.
Remember also that a directive's data-bound input properties are not set until _after construction_.