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.
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.