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

[Docs] Live example for the Lifecycle Hooks not working as expected. #22279

Closed
jainanuj0812 opened this issue Feb 17, 2018 · 6 comments
Closed

Comments

@jainanuj0812
Copy link
Contributor

[X ] Documentation issue or request

Current behavior

https://angular.io/guide/lifecycle-hooks
Live example for lifecycle hooks in documentation is not working as expected.

Below is the example link
https://stackblitz.com/angular/jlqeyrgaoaq

Clicking the 'Create PeekABooComponent' not logging the lifecycle hooks below it on UI.

Expected behavior

After clicking the 'Create PeekABooComponent' the logs should be viewed below it.

Possible Solution

The toggleChild method of PeekABooParentComponent should be:-

  toggleChild() {
    this.hasChild = !this.hasChild;
    if (this.hasChild) {
      this.heroName = 'Windstorm';
      this.logger.clear(); // clear log on create
    }
    **this.hookLog = this.logger.logs();**
    this.logger.tick();
  }
@trotyl
Copy link
Contributor

trotyl commented Apr 6, 2018

Closed by #23201

@brandonroberts
Copy link
Contributor

Hi @jainanuj0812. Are you still planning to submit an additional PR for this?

@jainanuj0812
Copy link
Contributor Author

Hi @brandonroberts, I have it on my local, will push it by EOD or by tomorrow.

@brandonroberts
Copy link
Contributor

Great, thanks

@gkalpak
Copy link
Member

gkalpak commented Mar 27, 2019

Closing since the original issue should have been fixed by #23201.

@gkalpak gkalpak closed this as completed Mar 27, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants