I have an AJAX function that retrieves JSON data from a file. I want to 
update the scope variable after the data loads


    
$scope.login = 'abc';


    $.ajax({
 method: 'GET',
 url: '../../users.json',
 success: function(data) {
 $scope.login = 'def';
 console.log(data[0]._id);
 };
 });


When I look at the view, I notice {{login}} is 'abc' and not 'def'.

Does anyone know how to update it?

-- 
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to