I have the following code:
appModule = angular.module(\'appModule\', []); appModule.factory(\'sharedApplication\', function($rootScope, $http) { var sharedApp
The more elegant and easier to read approach:
appModule.factory('myFactory', myFactory); myFactory.$inject = ['$rootScope','$http']; function myFactory($rootScope, $http) { ... }