Code Monkey home page Code Monkey logo

ng2-ion-range-slider's Introduction

ng2-ion-range-slider

Ion Range Slider now optimized for easy use as an importable Angular 2 Module and installable using npm.

Demos and Sample Usage

For Demos and sample usage of this package have a look at the example folder

git clone [email protected]:PhilippStein/ng2-ion-range-slider.git
cd ng2-ion-range-slider/example
npm install
npm start

Installation

npm install ng2-ion-range-slider --save

Setup scripts and styles

If you use angular-cli, add jquery and ion-range-slider to the scripts section of .angular-cli.json

{
  ...
  "apps": [
    {
      ...
      "scripts": [
            "../node_modules/jquery/dist/jquery.min.js", 
            "../node_modules/ion-rangeslider/js/ion.rangeSlider.min.js"
      ],
      ...   

Also add the ion-range-slider style and skin css to the styles section in your .angular-cli.json

{
  ...
  "apps": [
    {
      ...
      "styles": [
              "../node_modules/ion-rangeslider/css/ion.rangeSlider.css",
              "../node_modules/ion-rangeslider/css/ion.rangeSlider.skinFlat.css"
      ],
      ...   

Import IonRangeSliderModule

import the IonRangeSliderModule in your application module

import { IonRangeSliderModule } from "ng2-ion-range-slider";

@NgModule({
    imports: [IonRangeSliderModule]
})

Use the ion-range-slider

Use the ion-range-slider directive in your component.

<ion-range-slider #sliderElement
          type="double"
          [min]="myMinVar"
          max="100"
          from="28"
          from_min="10"
          from_max="30"
          from_shadow="true"
          to="40"
          to_min="40"
          to_max="90"
          to_shadow="true"
          grid="true"
          grid_num="10"
          prefix="Weight: "
          postfix=" million pounds"
          decorate_both="false"
          (onUpdate)="myOnUpdate($event)"
          (onChange)="myOnChange($event)"
          (onFinish)="myOnFinish($event)"></ion-range-slider>

ng2-ion-range-slider's People

Contributors

israelvainberg avatar philippstein avatar vitorbertazoli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.