nebo-form-errors

1.0.0 • Public • Published

nebo-form-errors

Get error object from From Controller. It could be useful for login for errors. eg, sending errors to mixpanel on submit form.

How to install

Install bower package

bower install nebo-form-errors --save

Add to application module.

angular.module('app', [
  ...,
  'formErrors'
]);

Example


angular.module('app').controller('AppController', function ($scope, $errors) {
  $scope.submit = function (form) {
    if (form.$invalid) {
      
      var formErrors = $errors.fromForm(form);
      console.log('form errors', formErrors);
      
      return;
    }
    
  };
});

Readme

Keywords

Package Sidebar

Install

npm i nebo-form-errors

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • bondalex