Hi
Before deleting record in i wan to get confirmarion in popup whether user wants to delete record or not. If yes only then record should be deleted
Thanks
Hi
Before deleting record in i wan to get confirmarion in popup whether user wants to delete record or not. If yes only then record should be deleted
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ramco RamcoPosted May 10, 2024, 4:08 AM
Hi Jignesh
I am getting error Cannot find name $. Do you need to install type definitions for Jquery.
Thanks
Jignesh KumarPosted May 9, 2024, 4:35 PM
Hello Ramco,
You can create as below in a simple way, Add div for confirmation model pop up in your html,
Add the below methods in your component,
Jayraj ChhayaPosted May 9, 2024, 12:09 PM
To achieve this functionality in Angular, you can utilize Angular Material Dialog component to create a modal popup for confirmation. Here's a basic implementation example:
By following these steps, you can implement a modal popup for confirmation before deleting a record in Angular using Angular Material Dialog.
Naimish MakwanaPosted May 9, 2024, 11:34 AM
To get a confirmation from the user before deleting a record, you can use Angular’s built-in
window.confirm()method. This method displays a dialog box with a specified message, along with an OK and a Cancel button.Here’s a basic example of how you might implement this:
In this example,
window.confirm()will display a dialog box with the message ‘Do you really want to delete the record?’. If the user clicks OK,window.confirm()will returntrueand the record will be deleted. If the user clicks Cancel,window.confirm()will returnfalseand the record will not be deleted.Thanks