0.1.0 • Published 8 years ago

angular-button-modal v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Angular modal button

A simple directive/componenet that generates a button which on click instantiates a customizable modal. Includes a method for executing service calls from the template.

Dependencies

This component requires ngDialog and angular-toastr


Installation


npm

npm install ng-dialog angular-toastr angular-modal-button

js

<body>
  <script src="js/angular-toastr.tpls.js"></script>
  <script src="js/ngDialog.js"></script>
  <script src="js/angular-modal-button.min.js"></script>
</body>

css

 <link rel="stylesheet" type="text/css" href="node_modules/ng-dialog/css/ngDialog-theme-default.css">
 <link rel="stylesheet" type="text/css" href="node_modules/angular-toastr/dist/angular-toastr.css">

##Usage


var app = angular.module('myApp', ['ngDialog', 'toastr', 'modal-btn'])
<modal-button>
  template          = "'url-to-template'"
  tmpl-scope-object = "{name: 'some-name', age: 00}"
  button-label      = "'some-label'"
  method            = "'some-method-name-matching-service'"
  service           = "'some-service-name'"
  button-class      = "'some-class'"
  modal-class       = "'some-class'">
</modal-button>
ParamTypeDetails
templateStringurl for the template
tmplScopeObject(optional)ObjectObject containing data which will be made available in modal on $scope
button-label(optional)StringLabel that will appear on the button if none is set it will default to the method name
method(optional)StringMethod to be called on service
service(optional)StringName of service to be executed from template if any
button-class(optional)Stringbutton class(es) to be applied, if none defaults to bootstrap default
modal-class(optional)Stringclass to be applied to the modal
allStringobject containing all the above
0.1.0

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago