ybug-angular
v1.0.3
Published
An Angular service for integrating the Ybug Feedback Widget.
Maintainers
Readme
Ybug-angular
A simple Angular wrapper for Ybug's Feedback Widget API.
Installation
npm install --save ybug-angularUsage
Import the service. You can use any setting mentioned in the documentation.
import { Component, OnDestroy, OnInit } from '@angular/core';
import { YbugService } from 'ybug-angular';
@Component({
selector: 'ybug-feedback',
template: '',
})
export class FeedbackComponent implements OnInit, OnDestroy {
constructor(private ybugService: YbugService) {}
ngOnInit(): void {
// Initialize the service
this.ybugService.init('YOUR_PROJECT_ID', { /* other options if needed */ });
// Show the button (just in case it's been hidden previously)
this.ybugService.show();
}
ngOnDestroy(): void {
// Hide the Feedback Button on destroy
this.ybugService.hide();
}
}