aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/auto/injector.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/auto/injector.js b/src/auto/injector.js
index becc878d..3d2ac628 100644
--- a/src/auto/injector.js
+++ b/src/auto/injector.js
@@ -482,17 +482,16 @@ function annotate(fn) {
* Here is an example of registering a service using
* {@link AUTO.$provide#methods_service $provide.service(class)}.
* <pre>
- * $provide.service('ping', ['$http', function($http) {
- * var Ping = function() {
- * this.$http = $http;
- * };
- *
- * Ping.prototype.send = function() {
- * return this.$http.get('/ping');
- * };
+ * var Ping = function($http) {
+ * this.$http = $http;
+ * };
+ *
+ * Ping.$inject = ['$http'];
*
- * return Ping;
- * }]);
+ * Ping.prototype.send = function() {
+ * return this.$http.get('/ping');
+ * };
+ * $provide.service('ping', Ping);
* </pre>
* You would then inject and use this service like this:
* <pre>