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

Angular 2 组件的生命周期 #56

Open
kittencup opened this issue Jan 22, 2016 · 0 comments
Open

Angular 2 组件的生命周期 #56

kittencup opened this issue Jan 22, 2016 · 0 comments
Labels

Comments

@kittencup
Copy link
Owner

接口

  • OnInit
  • OnDestroy
  • DoCheck
  • OnChanges
  • AfterContentInit
  • AfterContentChecked
  • AfterViewInit
  • AfterViewChecked

函数名

  • ngOnChanges - 当输入/输出绑定的值改变时调用
  • ngOnInit - 在第一次 ngOnChanges 后调用
  • ngDoCheck - 自定义的方法,检测和处理值的改变
  • ngAfterContentInit - 在组件内容初始化之后调用
  • ngAfterContentChecked - 组件每次检查内容时调用
  • ngAfterViewInit - 组件相应的视图初始化之后调用
  • ngAfterViewChecked - 组件每次检查视图时调用
  • ngOnDestroy - 指令销毁前调用。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant