# ngx-poll

> ngx-poll

Latest version **0.0.8-ng5** (published 2018-10-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install ngx-poll
pnpm add ngx-poll
yarn add ngx-poll
bun add ngx-poll
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8-ng5 |
| Published | 2018-10-01 |
| First published | 2018-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 100.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | borosr |
| Keywords | ngx-poll, angular, poll |

## Links

- npm: https://www.npmjs.com/package/ngx-poll
- Repository: https://github.com/borosr/ngx-poll
- Homepage: https://github.com/borosr/ngx-poll#readme
- Issues: https://github.com/borosr/ngx-poll/issues
- npm.io page: https://npm.io/package/ngx-poll

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.7.1

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 0.0.8-ng5 (latest) — 2018-10-01
- 0.0.7-ng5 — 2018-09-20
- 0.0.6-ng5 — 2018-09-20
- 0.0.5-ng5 — 2018-09-19
- 0.0.4-ng5 — 2018-09-17
- 0.0.4 — 2018-09-17
- 0.0.3 — 2018-09-17
- 0.0.2 — 2018-09-17
- 0.0.1 — 2018-09-15

## README

<h1 align="center">ngx-poll</h1>

<p align="center">
    Simple polling component with two main options (yes/no) and one optional (stay). 
</p>
<p align="center">
<a href="https://badge.fury.io/js/ngx-poll"><img src="https://badge.fury.io/js/ngx-poll.svg" alt="npm version" ></a>
</p>


## Table of contents

1. [Installation instructions](#installation-instructions)

2. [Documentation](#documentation)

   [@Inputs](#@Inputs)

   [@Outputs](#@Outputs)

3. [Example](#example)

   [Development server](#development-server)

4. [License](#license)

## Installation instructions

Install `ngx-poll` from `npm`:

```bash
npm install ngx-poll --save
```

Add `PollModule ` to NgModule imports:

```typescript
import { PollModule } from 'ngx-poll';

@NgModule({
  // ...
  imports: [
      PollModule,
      // ...
  ]
  // ...
})
```

Add component to your page:

```html
<ngx-poll [questions]="questions"></ngx-poll>
```

You will need **ngx-bootstrap** configuration:

- Into your `index.html`

```html
<!--- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
```

- Into your `app.component.ts` 

```typescript
import { setTheme } from 'ngx-bootstrap/utils';

@Component({...})
export class AppComponent {
  constructor() {
    setTheme('bs4');
    // ...
  }
}
```

## Documentation

### @Inputs

|         Name         |              Type              | Default value |
| :------------------: | :----------------------------: | :-----------: |
|  primaryButtonTitle  |             string             |     'Yes'     |
|  primaryButtonValue  |              any               |     true      |
| secondaryButtonTitle |             string             |     'No'      |
| secondaryButtonValue |              any               |     false     |
|  submitButtonTitle   |             string             |    'Send'     |
| submitButtonEnabled  |            boolean             |     false     |
|      dataLoaded      |            boolean             |     true      |
|      questions       | [{ text: string, value: any }] |   undefined   |

### @Outputs

| Name | Type |           Emited           |
| :--: | :--: | :------------------------: |
| send | void | When submit button clicked |

## Example

The example project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.1.5.

### Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## License

MIT

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