docs(cheatsheet): complete the copy edit (#11215)

…and general cleanup of the cheatsheet.
This commit is contained in:
Kathy Walrath
2016-09-01 12:06:42 -07:00
committed by Martin Probst
parent 0bb94df1da
commit e42a057048
11 changed files with 96 additions and 146 deletions

View File

@ -2,7 +2,7 @@
Directive and component change detection and lifecycle hooks
@cheatsheetIndex 9
@description
{@target ts dart}(implemented as class methods){@endtarget}
{@target ts}(implemented as class methods){@endtarget}
{@target js}(implemented as component properties){@endtarget}
@cheatsheetItem
@ -10,14 +10,12 @@ syntax(ts):
`constructor(myService: MyService, ...) { ... }`|`constructor(myService: MyService, ...)`
syntax(js):
`constructor: function(MyService, ...) { ... }`|`constructor: function(MyService, ...)`
syntax(dart):
`MyAppComponent(MyService myService, ...) { ... }`|`MyAppComponent(MyService myService, ...)`
description:
The class constructor is called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
@cheatsheetItem
syntax(ts dart):
syntax(ts):
`ngOnChanges(changeRecord) { ... }`|`ngOnChanges(changeRecord)`
syntax(js):
`ngOnChanges: function(changeRecord) { ... }`|`ngOnChanges: function(changeRecord)`
@ -26,16 +24,16 @@ Called after every change to input properties and before processing content or c
@cheatsheetItem
syntax(ts dart):
syntax(ts):
`ngOnInit() { ... }`|`ngOnInit()`
syntax(js):
`ngOnInit: function() { ... }`|`ngOnInit: function()`
description:
Called after the constructor, initializing input properties, and the first call to ngOnChanges.
Called after the constructor, initializing input properties, and the first call to `ngOnChanges`.
@cheatsheetItem
syntax(ts dart):
syntax(ts):
`ngDoCheck() { ... }`|`ngDoCheck()`
syntax(js):
`ngDoCheck: function() { ... }`|`ngDoCheck: function()`
@ -44,16 +42,16 @@ Called every time that the input properties of a component or a directive are ch
@cheatsheetItem
syntax(ts dart):
syntax(ts):
`ngAfterContentInit() { ... }`|`ngAfterContentInit()`
syntax(js):
`ngAfterContentInit: function() { ... }`|`ngAfterContentInit: function()`
description:
Called after ngOnInit when the component's or directive's content has been initialized.
Called after `ngOnInit` when the component's or directive's content has been initialized.
@cheatsheetItem
syntax(ts dart):
syntax(ts):
`ngAfterContentChecked() { ... }`|`ngAfterContentChecked()`
syntax(js):
`ngAfterContentChecked: function() { ... }`|`ngAfterContentChecked: function()`
@ -62,16 +60,16 @@ Called after every check of the component's or directive's content.
@cheatsheetItem
syntax(ts dart):
syntax(ts):
`ngAfterViewInit() { ... }`|`ngAfterViewInit()`
syntax(js):
`ngAfterViewInit: function() { ... }`|`ngAfterViewInit: function()`
description:
Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
Called after `ngAfterContentInit` when the component's view has been initialized. Applies to components only.
@cheatsheetItem
syntax(ts dart):
syntax(ts):
`ngAfterViewChecked() { ... }`|`ngAfterViewChecked()`
syntax(js):
`ngAfterViewChecked: function() { ... }`|`ngAfterViewChecked: function()`
@ -80,7 +78,7 @@ Called after every check of the component's view. Applies to components only.
@cheatsheetItem
syntax(ts dart):
syntax(ts):
`ngOnDestroy() { ... }`|`ngOnDestroy()`
syntax(js):
`ngOnDestroy: function() { ... }`|`ngOnDestroy: function()`