docs(lifecycle-hooks): change ngOnit references to ngOnInit
closes #1084
This commit is contained in:
parent
f2f5d9f9ae
commit
205cc28f25
|
@ -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_.
|
||||
|
|
Loading…
Reference in New Issue