Changed jquery get method to $http