code: function createClientModelDoc(form) {
        // refuse to work with invalid data
        if (vm.clientModelDoc._id || (form && !form.$valid)) {
          return;
        }
  
        ClientModelDocService.create(vm.clientModelDoc)
          .then(createClientModelDocSuccess)
          .catch(createClientModelDocCatch);
  
        function createClientModelDocSuccess(newClientModelDoc) {
          Toast.show({
            type: 'success',
            text: 'ClientModelDoc ' + newClientModelDoc.name + ' has been created',
            link: {state: 'clientModelDoc.list.detail', params: {id: newClientModelDoc._id}}
          });
          vm.close();
        }
  
        function createClientModelDocCatch(err) {
          if (form && err) {
            form.setResponseErrors(err);
          }
  
          Toast.show({
            type: 'warn',
            text: 'Error while creating a new ClientModelDoc'
          });
        }
      }
docs: @ngdoc function
  @name createClientModelDoc
  @methodOf <%= scriptAppName %>.clientModelDoc.create.controller:ClientModelDocCreateController
  @description
  Create a new clientModelDoc by using the ClientModelDocService create method
  
  @param {form} [form] The form to gather the information from