8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29d7272 commit c3fcbbdCopy full SHA for c3fcbbd
docs/content/guide/services.ngdoc
@@ -232,13 +232,13 @@ You can also register services via the {@link auto.$provide `$provide`} service
232
module's `config` function:
233
234
```javascript
235
-angular.module('myModule', []).config(function($provide) {
+angular.module('myModule', []).config(['$provide', function($provide) {
236
$provide.factory('serviceId', function() {
237
var shinyNewServiceInstance;
238
//factory function body that constructs shinyNewServiceInstance
239
return shinyNewServiceInstance;
240
});
241
-});
+}]);
242
```
243
244
This technique is often used in unit tests to mock out a service's dependencies.
0 commit comments