ng2-nouislider
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -6,6 +6,3 @@ { | ||
"./demo/*.*" | ||
], | ||
"server": { | ||
"baseDir": ["./demo", "./"] | ||
} | ||
] | ||
} |
@@ -10,2 +10,6 @@ import { OnInit, ElementRef, EventEmitter } from 'angular2/core'; | ||
onTouched: any; | ||
connect: boolean; | ||
min: number; | ||
max: number; | ||
step: number; | ||
ngModelChange: EventEmitter<any>; | ||
@@ -12,0 +16,0 @@ constructor(el: ElementRef); |
@@ -34,2 +34,6 @@ "use strict"; | ||
this.onTouched = Function.prototype; | ||
this.connect = false; | ||
this.min = 0; | ||
this.max = 10; | ||
this.step = 1; | ||
this.ngModelChange = new core_1.EventEmitter(); | ||
@@ -42,5 +46,7 @@ this.el = el; | ||
start: this.value || 0, | ||
step: this.step, | ||
connect: this.connect, | ||
range: { | ||
min: 0, | ||
max: 10 | ||
min: this.min, | ||
max: this.max | ||
} | ||
@@ -68,2 +74,18 @@ }); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata('design:type', Boolean) | ||
], Nouislider.prototype, "connect", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata('design:type', Number) | ||
], Nouislider.prototype, "min", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata('design:type', Number) | ||
], Nouislider.prototype, "max", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata('design:type', Number) | ||
], Nouislider.prototype, "step", void 0); | ||
__decorate([ | ||
core_1.Output(), | ||
@@ -70,0 +92,0 @@ __metadata('design:type', core_1.EventEmitter) |
@@ -34,2 +34,6 @@ import * as noUiSlider from 'nouislider'; | ||
@Input() connect: boolean = false; | ||
@Input() min: number = 0; | ||
@Input() max: number = 10; | ||
@Input() step: number = 1; | ||
@Output() ngModelChange: EventEmitter<any> = new EventEmitter(); | ||
@@ -41,8 +45,10 @@ | ||
public ngOnInit():void { | ||
ngOnInit(): void { | ||
this.slider = noUiSlider.create(this.el.nativeElement, { | ||
start: this.value || 0, | ||
step: this.step, | ||
connect: this.connect, | ||
range: { | ||
min: 0, | ||
max: 10 | ||
min: this.min, | ||
max: this.max | ||
} | ||
@@ -49,0 +55,0 @@ }); |
{ | ||
"name": "ng2-nouislider", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Angular2 noUiSlider directive", | ||
@@ -5,0 +5,0 @@ "main": "nouislider.js", |
@@ -5,2 +5,4 @@ # ng2-nouislider | ||
See [demo](http://tb.github.io/ng2-nouislider/) | ||
## Install | ||
@@ -14,5 +16,9 @@ | ||
Styles | ||
@import "~nouislider/distribute/nouislider.min.css"; | ||
## Usage | ||
<div nouislider [(ngModel)]="someValue"></div> | ||
<div nouislider [connect]="true" [min]="0" [max]="15" [(ngModel)]="someRange"></div> | ||
@@ -19,0 +25,0 @@ ## License |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14421
280
26