Angular Component To Choose A Value Using A “knob-like” Rotation Button

knob is an angular component to adjust values with the control of the typical handle (for example, very used in music devices).

The component is very essential, you only need to form the acceptable values and the degrees that the handle can manage.

A Simple Music Style Audio Player Using jQuery

How to make use of it:

Installation:

npm install ng2-knob --save

1. Using the handle tool is very simple. First, import the component within the angular application unit, such as this:

import { KnobModule } from 'ng2-knob';
...
@NgModule({
 ...
   declarations: [
        AppComponent,
        ...
    ],
    imports: [
      BrowserModule,
      FormsModule,
      KnobModule,
      ...
 ...
})
export class AppModule {}

2. To start working with the new component, add it to the HTML part of the component you want:

@Component({
    selector: 'my-app',
    template: `
  <h3>Knob Use Example</h3>
    <div class="container">
        <knob class="skin1" #myknob1 [min]="10" [max]="200" [value]="80" [startDegree]="200"  [endDegree]="120"></knob>
        <div class="info bpm">{{myknob1.meterValue}} bpm</div>
    </div>    
  `,
})
export class App {
    // ...
}

Input Parameters

<knob [min]=”0″ [max]=”100″\ [value]=”50″\ [startDegree]=”0″\ [endDegree]=”120″> </knob>

min (type: number)

  • The minimum value you need for the range of values [min, max]

max (type: number)

  • The maximum value you need for the range of values [min, max]

value (type: number)

  • The starting value you want for the knob. Consider putting a value between min and max.

startDegree (type: number)

  • The knob rotates from a start degree to an end degree. This is the start┬ádegree.

endDegree (type: number)

  • The knob rotates from a start degree to an end degree. This is the end┬ádegree.

intensive (type: boolean)

  • true (default) if you want to be notified of each small change by the change event. If not, you will be notified only after the end of the modification.

angular2-knob

knob

knob component for angular js, knob widget Plugin/Github


See Demo And Download

Official Website(spheras): Click Here

This superior jQuery/javascript plugin is developed by spheras. For extra advanced usage, please go to the official website.

Related Posts

Input-Values-Using-Mouse-Drag

Create Side Sliders Input Values Using Mouse Drag | Pointer Lock

HTML Range Slider is a lightweight library to create side sliders to adjust values easily and precisely by making use of the Pointer Lock API. Side Slider…

simple-parallax-scrolling-js

Smooth and Lightweight Parallax Scroll Library in Pure Javascript

Lightweight and seamless parallax scrolling library implemented in pure javascript using hardware acceleration for additional performance. Main Features Extremely lightweight with no dependencies A few kilobytes of pure…

Convert-Form-Data-to-JSON

How to Convert Form Data to JSON with HTML Forms | FormsJS

FormsJS is a simple-to-use JavaScript library that covers type subject values to JSON in real time. The items containing the data category will be analyzed automatically. It…

editable-html-table-using-javascript

A Small jQuery Extension to Convert An Editable HTML Table

Editable Table is a small jQuery extension to convert an editable HTML table for fast data entry and validation. A small jQuery extension to convert a static…

jquery.youtube-background

Simple jQuery Plugin for Embedding YouTube Videos As Cover Background

jquery.youtube-background is a jQuery plugin built to facilitate YouTube embeds as cover wallpaper using the YouTube Embed API. There is another jQuery Youtube Video Background plugin that…

Data-Table-Generator-Tabulator

Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…