iegorov
11/22/2016 - 3:29 AM

vm.cancelChanges from profile

vm.cancelChanges from profile

vm.cancelChanges = function() {
  vm.profile.firstName = vm.currentUser.profile.firstName || '';
  vm.profile.lastName = vm.currentUser.profile.lastName || '';
  vm.profile.about = vm.currentUser.profile.about || '';
  $timeout(function() {
    $scope.changeAboutMeForm.$setPristine();
    $scope.changeAboutMeForm.$setUntouched();
  }, 10);
};