Created
July 3, 2016 13:34
-
-
Save LeVadim/a22e4d84f935673dc788bbc8f902068d to your computer and use it in GitHub Desktop.
Angular 2 code which substitutes $httpParamSerializerJQLike
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private formatData(data){ | |
let returnData = ''; | |
console.log(data); | |
let count = 0; | |
for (let i in data){ | |
if(count == 0){ | |
returnData += i+'='+data[i]; | |
}else{ | |
returnData += '&'+i+'='+data[i]; | |
} | |
count = count + 1; | |
console.log(returnData); | |
} | |
return returnData; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to make a http server call using this formatted data?