Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit c3fcbbd

Browse files
committed
docs(guide/services): use array annotation in example
1 parent 29d7272 commit c3fcbbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/content/guide/services.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,13 @@ You can also register services via the {@link auto.$provide `$provide`} service
232232
module's `config` function:
233233

234234
```javascript
235-
angular.module('myModule', []).config(function($provide) {
235+
angular.module('myModule', []).config(['$provide', function($provide) {
236236
$provide.factory('serviceId', function() {
237237
var shinyNewServiceInstance;
238238
//factory function body that constructs shinyNewServiceInstance
239239
return shinyNewServiceInstance;
240240
});
241-
});
241+
}]);
242242
```
243243

244244
This technique is often used in unit tests to mock out a service's dependencies.

0 commit comments

Comments
 (0)