Making a $http call synchronous in AngularJS
- or -
Post a project like this2829
$$
- Posted:
- Proposals: 12
- Remote
- #1210514
- Awarded
Mobile & Web Application - Full Stack Development & Designing / DevOps Specialist
Ahmedabad
PHP/MVC|Symfony|Laravel|Codeigniter|Opencart|Wordpress|Shopify|Magento|Mysql|Pgsql|Jquery|Bootstrap|iOS|Android|Flutter|ReactJS
Ahmedabad
C#, .NET & MSSQL | Angular, Vuejs & Typescript| Cordova & Ionic | PHP & Laravel
Ystrad Mynach
Ranked Number-1 Service Providers on PPH: Expert IOS ANDROID Mobile App Developer | Web Developer |Digital Marketing|3D Animater
Campbell
Expert AngularJS|NodeJS|ExpressJS|Material Design|SASS|Bootstrap|Mobile Responisve Web Developer
Bangkok
Expert in Angular | NodeJS | Javascript | TypeScript | VueJS | ReactJS | Bootstrap | Html5 | CSS | Mailchimp | Newsletter Design | Photoshop | Banner design |Mobile app design
Dobrich
6199521118975061395387596651201022408103112410883861214859125088613008291306401
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