所以在我的网络应用中,我使用了这样的东西:
dd-MM-yyyy HH:mm
在Ionic中,我可以使用这样的东西吗?比如将这段javascript绑定到var id1 = '';
var imgPreview1 = document.getElementById('img-prev1');
var fileUpload1 = document.getElementById('file-input1');
fileUpload1.addEventListener('change', function (event) {
var file = event.target.files[0];
var formData = new FormData();
formData.append('file', file);
formData.append('upload_preset', CLOUDINARY_UPLOAD_PRESET);
axios({
url: CLOUDINARY_URL,
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data: formData
}).then(function (res) {
console.log(res);
imgPreview1.src = res.data.secure_url;
id1 = res.data.secure_url;
console.log(id1);
}).catch(function (err) {
console.log(err);
});
});
?