
Making a $http call synchronous in AngularJS
- or -
Post a project like this3242
$$
- Posted:
- Proposals: 10
- Remote
- #1210514
- Awarded
Mobile & Web Application - Full Stack Development & Designing / DevOps Specialist

Expert in Angular | NodeJS | Javascript | TypeScript | VueJS | ReactJS | Bootstrap | Html5 | CSS | Mailchimp | Newsletter Design | Photoshop | Banner design |Mobile app design

Ranked Number-1 Service Providers on PPH: Expert IOS ANDROID Mobile App Developer | Web Developer |Digital Marketing|3D Animater

6199521214859108838611189750613913064011031124130082912508861022408





Description
Experience Level: Intermediate
General information for the website: AngularJS code modification
Kind of development: Customization of existing website
Description of every page/module: I have an existing running angularjs page and it makes api calls for field validation. I need someone to make the $http call synchronous.
Here is the function call:
function validateClass(classAbr){
if (!validationArr[classAbr]){
$http({
method: 'POST',
url: '/api/?action=validateClass',
data: 'stateAbr=' +classAbr,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
}).
success(function(data, status, headers, config){
validationArr[classAbr] = data;
})
}
return validationArr[classAbr];
}
Description of requirements/features: You can use promise or any other method to make it synchronous, as long as it works I am fine with it.
Extra notes:
Kind of development: Customization of existing website
Description of every page/module: I have an existing running angularjs page and it makes api calls for field validation. I need someone to make the $http call synchronous.
Here is the function call:
function validateClass(classAbr){
if (!validationArr[classAbr]){
$http({
method: 'POST',
url: '/api/?action=validateClass',
data: 'stateAbr=' +classAbr,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
}).
success(function(data, status, headers, config){
validationArr[classAbr] = data;
})
}
return validationArr[classAbr];
}
Description of requirements/features: You can use promise or any other method to make it synchronous, as long as it works I am fine with it.
Extra notes:

TUNCAY D.
100% (2)Projects Completed
1
Freelancers worked with
1
Projects awarded
50%
Last project
12 Dec 2016
United States
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Can we discuss bit more on this?
50795
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies