Image not displaying with file_uri


#1

I trying to the show the photo selected by the user from the camere before uploading to the server.

If I set the image src to file_uri from the camera, it is not displaying.


#2

convert file uri to native uri

file.resolveLocalFileSystemURL(this.fileUri, function(entry) {
    var nativePath = entry.toURL();
    console.log('Native URI: ' + nativePath);
    document.getElementById('video').src = nativePath;

#3

Do not follow the advice in the previous post.

You only want to be directly manipulating the DOM (aka typing “document”) in an Angular application in very rare circumstances, where there is no better alternative. Use property/attribute binding instead wherever possible.

Also, you will save yourself hours of frustration if you never type the word “function” inside the body of one. Here is why.