making the request via angularjs