2.0.97 • Published 4 years ago

@bumblebee032/ng-feedback v2.0.97

Weekly downloads
12
License
MIT
Repository
github
Last release
4 years ago

feedback

An angular directive for sending feedback featuring Angular 6, Html2canvas, Angular Material, Rxjs, inspired by Google send feedback, based on angular-cli.

Demo

Alt text

Prerequisites

make sure your project:

How to use it in your project

download it from npm

npm install @bumblebee032/ng-feedback --save

use the feedback module in your project, at any module, you just need to imports into your module:

import { FeedbackModule } from '@bumblebee032/ng-feedback'

easy to use the directive, just add it in a html tag, such as:

<button feedback>feedback</button>

Properties

NameDefault Value
titleSend feedback
placeholderDescribe your issue or share your ideas
editTipClick to highlight or hide info
checkboxLabelInclude screenshot
cancelLabelCANCEL
sendLabelSEND
moveToolbarTipmove toolbar
drawRectTipDraw using yellow to highlight issues or black to hide sensitive info
highlightTiphighlight issues
hideTiphide sensitive info
editDoneLabelDONE
headerColourrgb(96, 125, 139)

method

send(feedback)

it is an output of the directive, the usage is:

<button 
  feedback 
  (send)="onSend($event)">feedback
</button>

Then you can custom the onSend method in your component. The param feedback is an object contains two properties: description and screenshot.

  • description is string to describe issues or ideas
  • screenshot comes from HTMLCanvasElement.toDataURL('image/png'), can be used as src of an img tag.

Getting started with this repo

Make sure you have Node version >= 8.0 and NPM >= 5

Clone/Download the repo then edit feedback library inside /src/app/feedback

# clone repo
git clone https://github.com/RickonChen/feedback.git

# change directory to our repo
cd feedback

# install the repo with npm
npm install

# start the server
npm start

# if you're in China use cnpm
# https://github.com/cnpm/cnpm

go to http://127.0.0.1:4200 or http://localhost:4200 in your browser

2.0.97

4 years ago

2.0.95

4 years ago

2.0.96

4 years ago

2.0.91

4 years ago

2.0.9

4 years ago

2.0.6

4 years ago

2.0.8

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago