inject $http service to main controller