took out $.ajax, and properly used $http module in order to get the $apply module to automatically apply