We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<div class="modal-body"> <p> Are you sure you want to delete employee {{ deleteEmployee?.name }}? </p> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal" > No </button> <button (click)="onDeleteEmployee(deleteEmployee?.id)" class="btn btn-danger" data-dismiss="modal" > Yes </button> </div> </div>
//getting error in line
(click)="onDeleteEmployee(deleteEmployee?.id)"
The text was updated successfully, but these errors were encountered:
This issue is coming in app.component.html file.From here I took the code - https://github.com/getarrays/employeemanagerapp/blob/065fa88c1dfcf05a2458ee38e277b67d621b65a9/src/app/app.component.html
this was edited by @Lethaha
Sorry, something went wrong.
I fixed it by doing the following:
Here is the code:
public onOpenModal(employee: Employee | null, mode: string): void { const container = document.getElementById('main-container'); const button = document.createElement('button'); button.type = 'button'; button.style.display = 'none'; button.setAttribute('data-toggle', 'modal'); if (mode === 'add') { button.setAttribute('data-target', '#addEmployeeModal'); } if (mode === 'edit') { if (employee != null) { this.editEmployee = employee; } button.setAttribute('data-target', '#updateEmployeeModal'); } if (mode === 'delete') { button.setAttribute('data-target', '#deleteEmployeeModal'); } container?.appendChild(button); button.click(); }
No branches or pull requests
<div class="modal-body"> <p> Are you sure you want to delete employee {{ deleteEmployee?.name }}? </p> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal" > No </button> <button (click)="onDeleteEmployee(deleteEmployee?.id)" class="btn btn-danger" data-dismiss="modal" > Yes </button> </div> </div>
//getting error in line
(click)="onDeleteEmployee(deleteEmployee?.id)"
The text was updated successfully, but these errors were encountered: