I am using http get function to get json array from service. How can I set response to controller locations element.
function MainCtrl($http,myService) {
this.locations = null;
myService.async().then(function(d) {
? = d;
});
}
Response d is well-formed (JSON)
You just take a reference to the current context and then use that variable reference in the callback