【发布时间】:2017-07-02 20:43:12
【问题描述】:
我有这个代码直接来自 Firebase 的文档:
// Create a reference to the file we want to download
var user = firebase.auth().currentUser.uid;
var storageRef = firebase.storage();
var pathReference = storageRef.ref('/' + user + '/profilePicture/' + image.name);
//var starsRef = storageRef.child('/' + user + '/profilePicture/' + file.name);
// Get the download URL
pathReference.getDownloadURL().then(function(url) {
// Insert url into an <img> tag to "download"
$scope.imageUrl = url;
console.log($scope.imageUrl);
});
但我不知道在我的 html 文件中写什么才能显示图像...有什么帮助吗?
【问题讨论】:
标签: javascript angularjs firebase ionic-framework firebase-storage