inside a jasmine unit test, we usually saw this sort of _service_
inside the inject for angular.mock
.
But I am still not sure how this works?
For example, the parameter _myService_ would be resolved as the reference myService. Since it is available in the function body as myService, we can then assign it to a variable defined in an outer scope.
In the official doc, it say above, however, does it means, ANY service that is inside already injected module, we should always reference like _MyServiceName_
? How exactly this MyServiceName
is getting from? Should we do something before we inject it? That's where I got confused.
Aucun commentaire:
Enregistrer un commentaire