docs(cheatsheet): add Dart-specific syntax & headings

Closes #5756
This commit is contained in:
Kathy Walrath
2015-12-09 10:22:40 -08:00
parent db096a5e22
commit f4d937ad8d
8 changed files with 44 additions and 20 deletions

View File

@ -5,8 +5,10 @@ Directive and component change detection and lifecycle hooks
(implemented as class methods)
@cheatsheetItem
syntax:
syntax(js ts):
`constructor(myService: MyService, ...) { ... }`|`constructor(myService: 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.
@ -64,4 +66,4 @@ Called after every check of the component's view. Applies to components only.
syntax:
`ngOnDestroy() { ... }`|`ngOnDestroy()`
description:
Called once, before the instance is destroyed.
Called once, before the instance is destroyed.