ngx-surveys
Version:
Angular 18+ survey / form builder
81 lines (54 loc) • 1.42 kB
Markdown
Angular survey / form builder for [Angular](https://angular.io).
Live [demo](https://vlasovilya.github.io/ngx-surveys/demo/)
A [stackblitz](https://stackblitz.com) is also available [here](https://stackblitz.com/edit/ngx-surveys)
Inspired by Google Forms and [angular-surveys](https://github.com/mwasiluk/angular-surveys) for AngularJS.
npm: `npm install ngx-surveys --save`
yarn: `yarn add ngx-surveys`
- Import into a module (`AppModule` example below)
```javascript
// app.module.ts
import { NgxSurveyModule } from 'ngx-surveys';
import { AppComponent } from './app.component';
@NgModule({
imports: [BrowserModule, NgxSurveyModule],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}
```
```html
<ngx-survey
[]="form"
[(value)]="model"
(submit)="onFormSubmit($event)"
>
</ngx-survey>
```
```html
<ngx-survey-form-builder
[]="form"
(changes)="onChange($event)"
>
</ngx-survey-form-builder>
```
```sh
yarn install
```
Edit files in `src/app` to add to the demo or try changes to the library.
*First, edit version in `package.json` and `src/lib/package.json` to publish a new version to npmjs.org*
```sh
yarn build
yarn release
```