Skip to content
Permalink
Browse files

docs($injector): fix inaccuracy in $provide.service docs

Closes #12664
Closes #12665
  • Loading branch information
alirezamirian authored and petebacondarwin committed Aug 24, 2015
1 parent 4ff9c02 commit ef03dfc4a4fc32c4a5145cec4db0f97087bfa6c1
Showing with 14 additions and 2 deletions.
  1. +14 −2 src/auto/injector.js
@@ -491,8 +491,20 @@ function annotate(fn, strictDi, name) {
*
* Register a **service constructor**, which will be invoked with `new` to create the service
* instance.
* This is short for registering a service where its provider's `$get` property is the service
* constructor function that will be used to instantiate the service instance.
* This is short for registering a service where its provider's `$get` property is a factory
* function that returns an instance instantiated by the injector from the service constructor
* function.
*
* Internally it looks a bit like this:
*
* ```
* {
* $get: function() {
* return $injector.instantiate(constructor);
* }
* }
* ```
*
*
* You should use {@link auto.$provide#service $provide.service(class)} if you define your service
* as a type/class.

0 comments on commit ef03dfc

Please sign in to comment.
You can’t perform that action at this time.