var getPicture = function() {
OpenFB.get('/me/picture?redirect=0&height=133&type=normal&width=100')//'/me/picture')
.success(function(data){
if(data !== $scope.userData.photo_url){
// var image = "<div class='userimage'><img src='" + data.data.url + "'/></div>";
// angular.element(document.querySelector('#userimage')).html(image);
$scope.userData.photo_url = data.data.url;
//tell the database the image associated with the user has changed
postUser();
$rootScope.$emit('userDataChanged', $scope.userData);
}
});
};
Ah, perhaps because of the issue I mentioned in https://github.com/LetsLunch/lunch/issues/76? OpenFB.success is surely outside the angular $digest cycle, so $scope.$apply will eliminate the need for the .html hack.
https://github.com/LetsLunch/lunch/blob/development/app/scripts/profile.js#L97
why not just
and
Ah, perhaps because of the issue I mentioned in https://github.com/LetsLunch/lunch/issues/76? OpenFB.success is surely outside the angular $digest cycle, so $scope.$apply will eliminate the need for the
.html
hack.