I have a form within a modal, see plnkr here. When editing the menu item, after making some changes, If I click cancel in the modal, I want the default menuitem without any changes being made to it to show up i.e. all changes discarded(). So the next time I go into the modal I meet the default item sans changes.
If I click save I want to keep the changes i.e. run the save method.
Both save and cancle close the modals after being clicked.
How do I create such a save and discard/cancel mechanism?
Are there other angular ways of achieving this effect, different
I am using the modal from angularStrap.