Hi Alex,

Probably your question is How to bind to incoming data?

function someController($http) {
  var vm=this;
  $http.get('someUrl').then(parseResponse)
  return;

  function parseResponse(response) {
     var data = response.data
     vm.model = data;
  }
}

Angual.module('demo',[]).controller('someController',someController);


PS, your should never put an $http (other then in samples/prototypes) in a 
controller, those should be encapsulated in services.
also This is a sample that's geared towards using the controllerAs syntax.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to