I cant get url of image uploaded to firebase storage

i am new ionic, the program takes the picture perfectly and sent to firebase . My question is : how can I show the URL of image in the view? i have this controller:

I appreciate it if I can help , greetings

.controller("formCtrl", function($scope,sharedUtils,$ionicPopup,$state, $rootScope, $cordovaCamera)

{

$scope.capturarFoto = function(sourceType) {

var options = {
quality : 75,
destinationType : Camera.DestinationType.FILE_URI,
sourceType : sourceType,
encodingType: Camera.EncodingType.JPEG,
popoverOptions: CameraPopoverOptions,
targetWidth: 500,
targetHeight: 500,
saveToPhotoAlbum: false
};

$cordovaCamera.getPicture(options).then(function(imageData) {

// $scope.images = imageData;

var storageRef = firebase.storage().ref();
// filename = imageData.name;

var getFileBlob = function(url, cb) {
var xhr = new XMLHttpRequest();
xhr.open(“GET”, url);
xhr.responseType = “blob”;
xhr.addEventListener(‘load’, function() {
cb(xhr.response);
});
xhr.send();
};

var blobToFile = function(blob, name) {
blob.lastModifiedDate = new Date();
blob.name = name;
return blob;
};

var getFileObject = function(filePathOrUrl, cb) {
getFileBlob(filePathOrUrl, function(blob) {
cb(blobToFile(blob, new Date().getTime())); // segundo parametro es el nombre de imagen
});
};

getFileObject(imageData, function(fileObject) {

var metadata = {
'contentType': fileObject.type

};
storageRef.child(‘images/’ + fileObject.name).put(fileObject, metadata);

uploadTask.on('state_changed', null, function(error) {
// [START onfailure]
console.error('Upload failed:', error);
alert('Upload failed:', error);
// [END onfailure]

}, function() {
console.log(‘Uploaded’,uploadTask.snapshot.totalBytes,‘bytes.’);
console.log(uploadTask.snapshot.metadata);
var url = uploadTask.snapshot.metadata.downloadURLs[0];
console.log(‘File available at’, url);
// [START_EXCLUDE]
document.getElementById(‘linkbox’).innerHTML = ‘’;
// [END_EXCLUDE]
});

});
}, function(error) {
console.error(error);
alert(error);
});

};

HTML:

<ion-view style="" class=" " id="page8" title="Enviar Incidencia">
    <ion-content class="has-header" padding="true" ng-controller="formCtrl">
 
 <button class="button button-full button-assertive" ng-click="capturarFoto()">
           take Photo
</button>
    The URL of Image is: <<url>>????????
</ion-content>
</ion-view>