Hi,
I’m trying to use ngModel with Prompt Alerts. Is it possible ?
Where can I insert my [(ngModel)]=“password”
in the following code :
Prompt Alerts :
alertEncryptMemo(){
let alert = this.alertCtrl.create({
title: 'Encrypt this memo',
message: 'Write the password then check again',
inputs: [
{
name: 'password',
placeholder: 'Password',
type: 'password'
},
{
name: 'password',
placeholder: 'Password verification',
type: 'password'
}
],
buttons: [
{
text: 'Set',
role: 'set',
handler: data => {
console.log('Password Set');
}
},
{
text: 'Cancel',
role: 'cancel',
handler: data => {
console.log('Cancelled');
}
},
]
});
alert.present();
console.log("Encrypt Current Memo");
}
Function if needed :
public safeMemo() {
if (this.memoInfo.pwd != undefined) {
alert("pwd != undefined");
}
else
{
alert("pwd = undefined")
bcrypt.genSalt(10, function(err, salt) {
bcrypt.hash("B4c0/\/", salt, function(err, hash) {
// Store hash in the password DB.
});
});
}
}
This is still in development.
Thanks for your time & help !