angular-mn-form

0.0.4 • Public • Published

npm version Dependency Status MIT Licence

angular-mn-form

An angular directive to mn-form

See the demo

Install

npm install --save angular-mn-form

And bundle dependencies and main files in dist/ with your preferred tool.

<link rel="stylesheet" href="path/to/vendor.css">
<script src="path/to/vendor.js"></script>
<script src="path/to/mn-form.js"></script>

Usage

// add dependency in you module
angular.module('app', [
  'mn-form'
]);

And then, in your html, you can use the tag:

<mn-form submit='controller.save()'>
  <!-- content of form here, inputs, textarea, select, buttons, etc -->
</mn-form>

Note, the submit directive, will check validity of form, and only if is valid, they call your method (controller.save in example). Is similar to submit='form.$valid && controller.save', but you dont need write form.$valid, this is implicit in submit directive.

For more details check docs mn-form docs.

Package Sidebar

Install

npm i angular-mn-form

Weekly Downloads

1

Version

0.0.4

License

MIT

Last publish

Collaborators

  • darlanmendonca