Answer the question
In order to leave comments, you need to log in
How to save date on Firebase (AngularFire2)?
I ran into a problem, when trying to save the date on firebase, it is simply ignored and everything except it is saved, I write on AngularFire2, what should I do? How to save the date? Maybe it can somehow be translated into a string... Help! Thank you!
investb(task:string) {
console.log(task);
// sfdsdfsdd = nick
let sfdsdfsdd = jQuery('.hdsuhudsf').text();
let nows = new Date();
console.log(nows);
console.log(sfdsdfsdd);
if(task == ''){
Materialize.toast('Error' , 1000);
console.log('test2');
}else{
Materialize.toast('Ваша заявка отправлена!', 3000, 'green');
console.log('test3');
// Нужно сохранить время (переменная nows)
this.af.database.list('tasks').push({ task: task,status:'naw', nick: sfdsdfsdd, time:nows, test:'test' });
console.log('test4');
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question