Currently, I am facing an issue with implementing CSS on elements that are nested inside a function. I am unsure of how to access them properly.
For example:
updateUser() {
this.usersService.UpdateUser(this.user.id, this.user)
.subscribe(() => {
alert("Password changed! You are taken to the login page")
this.router.navigate(['login']);
},(e)=> {
this.errors = [];
if (e.error.errors.Password) {
this.errors.push(e.error.errors.Password);
}
}
)
}
Specifically, within this function, I am trying to apply CSS to the alert message:
alert("Password changed! You are taken to the login page")
As well as to the confirmation dialog:
deleteUser(id:string,user:User){
if(confirm(`Are you sure you want to delete user ${user.userName}`)){
this.usersService.DeleteUser(id)
.subscribe(
() =>{
this.router.navigate(['login']);
}
)
}
}
Within this function, I am looking to style the confirm dialog box that prompts:
if(confirm(`Are you sure you want to delete user ${user.userName}`)){