I currently I have this way to get a JSON list.
function ()
{
return $http
(
{
url: '../Content/Scripts/Languages/en.json',
method: "GET",
headers:
{
'Content-Type': 'application/json; charset=utf-8'
}
}
);
},
The reason I don't want to use a GET method is because it works as a promise, and because of that, any function that happens after the promise will execute, and if the list that I retrieve from there is empty will make the app crash.
So what I want is retrieve the list and after that, the rest of my functions can execute with a List filled.
Any suggestions?