Using AngularJs to send REST ajax calls