generators/app/templates/client/app/admin(auth)/user/list/edit/edit.controller.js
function performRemove() {
        UserService.remove(vm.user)
          .then(deleteUserSuccess)
          .catch(deleteUserCatch);

        function deleteUserSuccess() {
          Toast.show({type: 'success', text: 'User ' + vm.displayName + ' deleted'});
          vm.showList();
        }

        function deleteUserCatch(err) {
          Toast.show({
            type: 'warn',
            text: 'Error while deleting user ' + vm.displayName,
            link: {state: $state.$current, params: $stateParams}
          });

          if (form && err) {
            form.setResponseErrors(err, vm.errors);
          }
        }
      }
function performRemove() {
        UserService.remove(vm.user)
          .then(deleteUserSuccess)
          .catch(deleteUserCatch);

        function deleteUserSuccess() {
          Toast.show({type: 'success', text: 'User ' + vm.displayName + ' deleted'});
          vm.showList();
        }

        function deleteUserCatch(err) {
          Toast.show({
            type: 'warn',
            text: 'Error while deleting user ' + vm.displayName,
            link: {state: $state.$current, params: $stateParams}
          });

          if (form && err) {
            form.setResponseErrors(err, vm.errors);
          }
        }
      }
function performRemove ( ) { UserService . remove ( vm . user ) . then ( deleteUserSuccess ) . catch ( deleteUserCatch ) ; function deleteUserSuccess ( ) { Toast . show ( { type : 'success' , text : 'User ' + vm . displayName + ' deleted' } ) ; vm . showList ( ) ; } function deleteUserCatch ( err ) { Toast . show ( { type : 'warn' , text : 'Error while deleting user ' + vm . displayName , link : { state : $state . $current , params : $stateParams } } ) ; if ( form && err ) { form . setResponseErrors ( err , vm . errors ) ; } } }
Removes a user by using the UserService remove method
@api private
Removes a user by using the UserService remove method