# angular-eha.counter

> Counting directive

Latest version **1.2.0** (published 2015-09-07) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install angular-eha.counter
pnpm add angular-eha.counter
yarn add angular-eha.counter
bun add angular-eha.counter
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2015-09-07 |
| First published | 2015-09-07 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | ehealthafrica |
| Keywords | counter, counting, directive, eha |

## Links

- npm: https://www.npmjs.com/package/angular-eha.counter
- Repository: https://github.com/eHealthAfrica/angular-eha.counter
- Homepage: http://docs.ehealthafrica.org/angular-eha.counter/
- Issues: https://github.com/eHealthAfrica/angular-eha.counter/issues
- npm.io page: https://npm.io/package/angular-eha.counter

## Recent versions

- 1.2.0 (latest) — 2015-09-07
- 1.1.1 — 2015-09-07
- 1.1.0 — 2015-09-07
- 1.0.4 — 2015-09-07
- 1.0.3 — 2015-09-07
- 1.0.2 — 2015-09-07
- 1.0.1 — 2015-09-07
- 1.0.0 — 2015-09-07

## README

# angular-eha.counter

[![Build Status][travis-image]][travis-url]

> Counting directive

[travis-image]: https://img.shields.io/travis/eHealthAfrica/angular-eha.counter.svg
[travis-url]: https://travis-ci.org/eHealthAfrica/angular-eha.counter

## Usage

Use the `bind` attribute to bind on the current count:

```html
<eha-counter
  bind="myCtrl.count"
></eha-counter>
```

## Options

### `template-url`

A custom template can be used with the `template-url` attribute:

```html
<eha-counter
  bind="myCtrl.count"
  template-url="/path/to/tpl.html"
></eha-counter>
```

Note, the default template assumes a mobile UI and depends on [Bootstrap][] and
[font-awesome][].

[bootstrap]: http://getbootstrap.com
[font-awesome]: http://fontawesome.io

### `ehaCounterProvider`

Exposes the `increment` and `decrement` callbacks (both `angular.noop` by
default), which are passed corresponding count on change. Can be overridden in
an `angular.config` block, for example:

```js
angular.module('myApp')
  .config(function (ehaCounterProvider) {
    ehaCounterProvider.increment = function (count) {
      console.log('The count is', count)
    }
  })
```

## Installation

Install with npm:

    npm install --save angular-eha.counter

Or alternatively bower:

    bower install --save angular-eha.counter

Then simply add `eha.counter` as a dependency somewhere in your project
that makes sense and you're good to go.

## Contributors

* © 2015 Jideobi Ofomah <jideobi.ofomah@ehealthnigeria.org>
* © 2015 Tom Vincent <tom.vincent@ehealthnigeria.org> (https://tlvince.com)

## License

Released under the [Apache 2.0 License][license].

[license]: http://www.apache.org/licenses/LICENSE-2.0.html

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