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

@ -37,11 +37,13 @@ syntax(ts):
`@Injectable()
class MyService() {}`|`@Injectable()`
syntax(js):
`var OtherService = ng.core.Class({constructor: function() { }});
var MyService = ng.core.Class({constructor: [OtherService, function(otherService) { }]});`|`var MyService = ng.core.Class({constructor: [OtherService, function(otherService) { }]});`
`var OtherService = ng.core.Class(
{constructor: function() { }});
var MyService = ng.core.Class(
{constructor: [OtherService, function(otherService) { }]});`|`var MyService = ng.core.Class({constructor: [OtherService, function(otherService) { }]});`
description:
{@target ts}Declares that a class has dependencies that should be injected into the constructor when the dependency injector is creating an instance of this class.
{@endtarget}
{@target js}
Declares a service to inject into a class by providing an array with the services with the final item being the function which will receive the injected services.
Declares a service to inject into a class by providing an array with the services, with the final item being the function to receive the injected services.
{@endtarget}