Making angular ui version do something on edit/save