If the image is from remote server, you can fetch the base64 content in your controller like this:
$http.get($scope.user.photo).then(function(response) {
$scope.user.data = response.data;
});
then display it on view
<img data-ng-src="data:image/png;base64,{{user.data}}" data-err-src="images/png/avatar.png"/>
While if the image is on local disk/phone, first you can get the image data from FileReader
var fileInput = document.getElementById("myfileinput");
// files is a FileList object (similar to NodeList)
var files = fileInput.files;
$scope.imageSrc = files[0].getAsDataURL();
then bind the $scope.imageSrc
to view as <img ng-src="imageSrc" >
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…