ngx-poll
v0.0.8-ng5
Published
<h1 align="center">ngx-poll</h1>
Downloads
29
Readme
Table of contents
Installation instructions
Install ngx-poll
from npm
:
npm install ngx-poll --save
Add PollModule
to NgModule imports:
import { PollModule } from 'ngx-poll';
@NgModule({
// ...
imports: [
PollModule,
// ...
]
// ...
})
Add component to your page:
<ngx-poll [questions]="questions"></ngx-poll>
You will need ngx-bootstrap configuration:
- Into your
index.html
<!--- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
- Into your
app.component.ts
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 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