docs(cheatsheet): update to new syntax
See https://github.com/angular/angular.io/pull/459 Closes #5733
This commit is contained in:

committed by
Pete Bacon Darwin

parent
ca73852746
commit
2f0744b089
@ -5,45 +5,63 @@ Directive and component change detection and lifecycle hooks
|
||||
(implemented as class methods)
|
||||
|
||||
@cheatsheetItem
|
||||
syntax:
|
||||
`constructor(myService: MyService, ...) { ... }`|`constructor(myService: MyService, ...)`
|
||||
description:
|
||||
The class constructor is called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
|
||||
|
||||
|
||||
@cheatsheetItem
|
||||
syntax:
|
||||
`ngOnChanges(changeRecord) { ... }`|`ngOnChanges(changeRecord)`
|
||||
description:
|
||||
Called after every change to input properties and before processing content or child views.
|
||||
|
||||
|
||||
@cheatsheetItem
|
||||
syntax:
|
||||
`ngOnInit() { ... }`|`ngOnInit()`
|
||||
description:
|
||||
Called after the constructor, initializing input properties, and the first call to ngOnChanges.
|
||||
|
||||
|
||||
@cheatsheetItem
|
||||
syntax:
|
||||
`ngDoCheck() { ... }`|`ngDoCheck()`
|
||||
description:
|
||||
Called every time that the input properties of a component or a directive are checked. Use it to extend change detection by performing a custom check.
|
||||
|
||||
|
||||
@cheatsheetItem
|
||||
syntax:
|
||||
`ngAfterContentInit() { ... }`|`ngAfterContentInit()`
|
||||
description:
|
||||
Called after ngOnInit when the component's or directive's content has been initialized.
|
||||
|
||||
|
||||
@cheatsheetItem
|
||||
syntax:
|
||||
`ngAfterContentChecked() { ... }`|`ngAfterContentChecked()`
|
||||
description:
|
||||
Called after every check of the component's or directive's content.
|
||||
|
||||
|
||||
@cheatsheetItem
|
||||
syntax:
|
||||
`ngAfterViewInit() { ... }`|`ngAfterViewInit()`
|
||||
description:
|
||||
Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
|
||||
|
||||
|
||||
@cheatsheetItem
|
||||
syntax:
|
||||
`ngAfterViewChecked() { ... }`|`ngAfterViewChecked()`
|
||||
description:
|
||||
Called after every check of the component's view. Applies to components only.
|
||||
|
||||
|
||||
@cheatsheetItem
|
||||
syntax:
|
||||
`ngOnDestroy() { ... }`|`ngOnDestroy()`
|
||||
description:
|
||||
Called once, before the instance is destroyed.
|
Reference in New Issue
Block a user