replace save button function with ng-change