Angular 2+ Prize Winning Wheel – ngx-wheel

Author: Sayegh7
Publish Date:
Official Page: Go to website
Views Total: 80
License: MIT

Description:

ng-wheel is an open-source angular (2+) library which creates a dynamic prize-winning wheel. It is used to display predetermined winnings while appearing to be random to the user. This can be used to allow a server to determine the prize before the wheel spins, then the wheel would spin and land on the prize that the server selected.

Installation:

# NPM
$ npm ngx-wheel --save

Usage:

Import the ngx-wheel into your ngModule.

import { NgxWheelModule } from 'ngx-wheel';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    NgxWheelModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Use the component.

<ngx-wheel prizeToWin="iPhone" [prize_descriptions]="['Car','iPhone','$200']" [colors]="['#ff0000', 'green', 'blue']"></ngx-wheel>

Parameters:

  • prizeToWin: the prize
  • prize_descriptions: array of description
  • color: array of colors

Preview:

ngx-wheel

Leave a Reply