Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration: update assets for lifecycle hooks page #44

Merged
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class AfterChangesComponent implements AfterChanges {

// #docregion ng-after-changes
ngAfterChanges() {
changeLog.add('Input property has changed.');
changeLog.add('Input property has changed. ($power)');
}
// #enddocregion ng-after-changes

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/_assets/image/ng/devguide/lifecycle-hooks/do-check-anim.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified src/_assets/image/ng/devguide/lifecycle-hooks/peek-a-boo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions src/guide/lifecycle-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,11 @@ The host `AfterChangesParentComponent` binds to them like this:
<after-changes [hero]="hero" [power]="power"></after-changes>
```

<!-- TODO: migrate -->
<!-- Here's the sample in action as the user makes changes. -->
<!-- <img class="image-display" src="{% asset ng/devguide/lifecycle-hooks/on-changes-anim.gif @path %}" alt="AfterChanges"> -->
<!-- The log entry appear as the string value of the *power* property changes. -->
<!-- But the `ngAfterChanges` does not catch changes to `hero.name` -->
<!-- That's surprising at first. -->
Here's the sample in action as the user makes changes.
<img class="image-display" src="{% asset ng/devguide/lifecycle-hooks/after-changes-anim.gif @path %}" alt="AfterChanges">
The log entry appear as the string value of the *power* property changes.
But the `ngAfterChanges` does not catch changes to `hero.name`
That's surprising at first.

Angular only calls the hook when the value of the input property changes.
The value of the `hero` property is the *reference to the hero object*.
Expand Down