dpw-feedback-widget
v1.1.7
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
Downloads
5
Readme
DpwFeedbackWidget
This library was generated with Angular CLI version 12.2.0.
Installation
- Install package from
npm
.
npm install dpw-feedback-widget --save
- Include
DpwFeedbackWidgetModule
into your application.
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { DpwFeedbackWidgetModule } from 'dpw-feedback-widget';
@NgModule({
imports: [BrowserModule, DpwFeedbackWidgetModule],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}
- Reference the assets of the libary in
angular.json
file.
{
"build": {
"options": {
"assets": [
{
"glob": "**/*",
"input": "./node_modules/dpw-feedback-widget/assets",
"output": "/assets/"
}
]
}
}
}
- Inject library CSS into main
styles.css
orstyles.scss
file.
@import "../node_modules/dpw-feedback-widget/assets/styles.css";
- your.template.html
<dpw-feedback-widget
[isLoggedIn]="false"
heading="Share Your Feedback"
description="How would you rate your experience?"
ratingStyle="smiley"
thankYouHeading="Thank You!"
thankYouDescription="We appriciate your feedback and response. Looking forward to serve you again."
tenantId=""
tenantName=""
>
</dpw-feedback-widget>
- Other input properties.
@Input() width: string; // To customise popup width
@Input() height: string; // To customise popup height
@Input() ratingStyle: string; // Possible values: star, smiley
@Input() feedbackBtnText: string; // Default - "Submit Feedback"
@Input() thankYouBtnText: string; // Default - "Done"
@Input() failureDescription: string; // Default - "Could not submit feedback, please try submitting again."
@Input() showClose: boolean; // Default - true
@Input() enableProgressive: boolean; // This will work if: isLoggedIn = true
@Input() progressiveChips: string[]; // Maximum 4 chips allowed
@Input() badRatingHeader: string; // Default - "What went wrong?"
@Input() averageRatingHeader: string; // Default - "What went well?"
@Input() goodRatingHeader: string; // Default - "What went well?"
@Output() onClose = new EventEmitter(); // To close feedback popup
@Output() onSuccess = new EventEmitter(); // When thank you screen button clicked
@Output() onError = new EventEmitter(); // In case error occurred after submit feedback
@Input() textareaLimit: number; // Default - 250
@Input() userEmail: string;
@Input() trackingParam1: string;
@Input() trackingParam2: string;
@Input() trackingMetadata: object;
@Input() environmentType: string; // Possible values: prod, staging, qa (default)
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.