title: code refactoring, how to elegantly overwrite object values
body: <p>so I have a call to factory and after everything goes fine I want to reset the values of imput fields and as you can see in the code below I do this by hand.</p>
  
  <pre><code>vm.submitRequest = () = &gt; {
      requestedBooksFactory.requestBook(vm.title, vm.author, vm.link, vm.destination, vm.currentUser, vm.comments)
          .then(function (newbook) {
          let booksInTotal = vm.requestedBooks.allBooks.length + 1;
  
          vm.requestedBooks.allBooks.push(newbook);
          vm.requestedBooks.header = requestedBooksFactory.requestedText(booksInTotal);
      }).then(() = &gt; {
          vm.title = '';
          vm.author = '';
          vm.link = '';
          vm.comments = '';
          vm.destination = false;
          vm.submitted = false;
      })
  }
  </code></pre>
  
  <p>I dont like the way this looks, but cant come up with a way to solve it</p>