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,16 +5,22 @@ Dependency injection configuration
|
||||
`import {provide} from 'angular2/angular2';`
|
||||
|
||||
@cheatsheetItem
|
||||
`provide(MyService, {useClass: MyMockService})``provide`|`useClass`
|
||||
syntax:
|
||||
`provide(MyService, {useClass: MyMockService})`|`provide`|`useClass`
|
||||
description:
|
||||
Sets or overrides the provider for MyService to the MyMockService class.
|
||||
|
||||
|
||||
@cheatsheetItem
|
||||
`provide(MyService, {useFactory: myFactory})``provide`|`useFactory`
|
||||
syntax:
|
||||
`provide(MyService, {useFactory: myFactory})`|`provide`|`useFactory`
|
||||
description:
|
||||
Sets or overrides the provider for MyService to the myFactory factory function.
|
||||
|
||||
|
||||
@cheatsheetItem
|
||||
`provide(MyValue, {useValue: 41})``provide`|`useValue`
|
||||
syntax:
|
||||
`provide(MyValue, {useValue: 41})`|`provide`|`useValue`
|
||||
description:
|
||||
Sets or overrides the provider for MyValue to the value 41.
|
||||
|
||||
|
Reference in New Issue
Block a user