Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Change ngOnit references to ngOnInit #1084

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions public/docs/ts/latest/guide/lifecycle-hooks.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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_.
Expand Down