addNote(){
let alert= this.alertCtrl.create({
title:‘Add Note’,
inputs:[{
name:‘note’,
placeholder:‘Type note’
}],
buttons:[
{
text:‘Cencel’,
role:‘calcel’,
},
{
text:‘Add’,
handler:data=>{
this.noteCollection.add(data).then(result =>{
console.log(result.id);
this.noteID=result.id;
this.db.doc(notes/${result.id}).update({id:this.noteID});
}).catch(err=>{
console.log(err);
})
}
}
]
});
alert.present();
}