Angular.js アプリをいじっていて、特に私のような初心者だとコンポーネントが実際にどんなもんなのか、JavaScript コンソールでごにょごにょしながら理解したいなーというときがある。
var myApp = angular.module("myApp", []);
myApp.service('BlogService', function() {
// do something
});
上記のような module、service がある場合には以下のような感じで。
angular.injector(["ng", "myApp"]).get("BlogService")
API ドキュメントは以下。