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

Clarify which code (above and below) #7020

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/content/error/$injector/unpr.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ angular.module('myApp', [])
}]);
```

This code will fail with `$injector:unpr` if `myService` is not defined. Making
sure each dependency is defined will fix the problem.
The above code will fail with `$injector:unpr` if `myService` is not defined.

Making sure each dependency is defined will fix the problem, as noted below.

```
angular.module('myApp', [])
.service('myService', function () { /* ... */ })
.controller('MyController', ['myService', function (myService) {
// Do something with myService
}]);
```
```