AngularJS directive that works like ng-model but saves changes only when form is submitted (otherwise changes are canceled)