survery-lib 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +42 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,24 +1,53 @@
1
- # SurveryLib
1
+ # SurveyWorkspace
2
2
 
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.1.0.
3
+ Survey Library for angular
4
4
 
5
- ## Code scaffolding
5
+ ## Versions
6
6
 
7
- Run `ng generate component component-name --project survery-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project survery-lib`.
8
- > Note: Don't forget to add `--project survery-lib` or else it will be added to the default project in your `angular.json` file.
7
+ | Angular | Survey Lib |
8
+ |------------------|:----------:|
9
+ | >=16.0.0 <17.0.0 | v16.x.x |
9
10
 
10
- ## Build
11
11
 
12
- Run `ng build survery-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
12
+ ## Getting started
13
+ ### Step 1: Install `survery-lib`:
13
14
 
14
- ## Publishing
15
+ #### NPM
16
+ ```shell
17
+ npm i survery-lib
18
+ ```
15
19
 
16
- After building your library with `ng build survery-lib`, go to the dist folder `cd dist/survery-lib` and run `npm publish`.
20
+ ### Step 2: Import the SurveryLibModule and angular NgStackFormsModule module:
21
+ ```js
22
+ import { NgStackFormsModule } from '@ng-stack/forms';
23
+ import { SurveryLibModule } from 'survery-lib/src/public-api';
24
+ @NgModule({
25
+ declarations: [AppComponent],
26
+ imports: [NgStackFormsModule ,SurveryLibModule.forRoot()],
27
+ bootstrap: [AppComponent]
28
+ })
29
+ export class AppModule {}
30
+ ```
17
31
 
18
- ## Running unit tests
32
+ ### Step 3: Include a theme:
33
+ ```scss
34
+ @import "~survery-lib/assets/style.css";
35
+ ```
19
36
 
20
- Run `ng test survery-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
37
+ ### Step 4: to load survey json:
21
38
 
22
- ## Further help
39
+ ```ts
23
40
 
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
41
+ import { SurveyLibService } from 'survery-lib';
42
+
43
+ this._SurveyLibService.setSurveyData(surveyJson);;
44
+
45
+ ```
46
+
47
+ ### Step 5: In template use `lib-survery-lib` component with your options
48
+
49
+ ```html
50
+
51
+ <lib-survery-lib #surveryLibrary (surveyResultEmit)="onFinishSurvey($event)"></lib-survery-lib>
52
+
53
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survery-lib",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0"