# angular-button-modal

> A simple button directive

Latest version **0.1.0** (published 2016-06-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular-button-modal
pnpm add angular-button-modal
yarn add angular-button-modal
bun add angular-button-modal
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-06-08 |
| First published | 2016-06-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Paolo Profetto |
| Maintainers | paoloprofetto |
| Keywords | angular.js, modal, button, component, directive |

## Links

- npm: https://www.npmjs.com/package/angular-button-modal
- Repository: https://github.com/paolopr/angular-modal-button
- Issues: https://github.com/paolopr/angular-modal-button/issues
- npm.io page: https://npm.io/package/angular-button-modal

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads
- [react-native-modal-translucent-axton](https://npm.io/package/react-native-modal-translucent-axton.md) — 4 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-06-08
- 0.0.9 — 2016-06-08
- 0.0.8 — 2016-06-08
- 0.0.7 — 2016-06-08
- 0.0.5 — 2016-06-08

## README

# **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](https://github.com/likeastore/ngDialog) and [angular-toastr](https://github.com/Foxandxss/angular-toastr)
 
 --- 
 
 ## **Installation**
 ---
 
 **npm**
 
 ```
 npm install ng-dialog angular-toastr angular-modal-button
 ```
 
 **js**
 
 
 ```html
 <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**
 
 ```html
  <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**
 ---
 
 ```javascript
 var app = angular.module('myApp', ['ngDialog', 'toastr', 'modal-btn'])
 ```

 ```html
 <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>
 ```    
 


| Param                     | Type   | Details                                                                                |
|---------------------------|--------|----------------------------------------------------------------------------------------|
| template                  | String | url for the template                                                                   |
| tmplScopeObject(optional) | Object | Object containing data which will be made available in modal on $scope                 |
| button-label(optional)    | String | Label that will appear on the button if none is set it will default to the method name |
| method(optional)          | String | Method to be called on service                                                         |
| service(optional)         | String | Name of service to be executed from template if any                                    |
| button-class(optional)    | String | button class(es) to be applied, if none defaults to bootstrap default                  |
| modal-class(optional)     | String | class to be applied to the modal                                                       |
| all                       | String | object containing all the above                                                          |

---
_Source: https://npm.io/package/angular-button-modal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
