declarative ajax requests for angularjs