update angular directive to use $http for requests