docs(error/$injector/unpr): clarify which code is being referred to in the text

Closes #7020
This commit is contained in:
specialorange
2014-04-06 15:28:56 -04:00
committed by Peter Bacon Darwin
parent 510c328d74
commit 6c3a0519fa

View File

@@ -14,8 +14,9 @@ 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', [])
@@ -23,4 +24,4 @@ angular.module('myApp', [])
.controller('MyController', ['myService', function (myService) {
// Do something with myService
}]);
```
```