Number Picker

Number Picker

Number picker bower component for Ionic Apps

$0.00

Matthew Ridley

Matthew Ridley

Member since 2015

Details

Version:
1.1.4
Ionic:
1.x  
Platforms:
iOS, Android  
Released:
5 years ago
Updated:
5 years ago
Category:
Plugins
Tags:
,

##Introduction:

This is a ionic-numberpicker bower component which can be used with any Ionic framework's application.

It is based on the 'ionic-timepicker' and 'ionic-datepicker' by https://github.com/rajeshwarpatlolla

##Prerequisites.

1) node.js, npm, ionic, bower and gulp.

##How to use:

1) In your project repository install the ionic time picker using bower

bower install ionic-numberpicker --save

2) Give the path of ionic-numberpicker.bundle.min.js in your index.html file.

```html

```

3) In your application module inject the dependency ionic-numberpicker, in order to work with the ionic-numberpicker component

```javascript angular.module('modulename', ['ionic', 'ionic-numberpicker']){

} ```

4) Use the below format in your template's corresponding controller

javascript $scope.numberPickerObject = { inputValue: 0, //Optional minValue: -9007199254740991, maxValue: 9007199254740991, precision: 3, //Optional decimalStep: 0.25, //Optional format: "DECIMAL", //Optional - "WHOLE" or "DECIMAL" titleLabel: 'Number Picker', //Optional setLabel: 'Set', //Optional closeLabel: 'Close', //Optional setButtonType: 'button-positive', //Optional closeButtonType: 'button-stable', //Optional callback: function (val) { //Mandatory timePickerCallback(val); } };

5) Add directive to your html template similar to:

```html

Weight   {{ weight }} {{ weightType }}

```

##Versions:

2) v1.1

  • Fixed issue with floating point math
  • Added support for negative numbers

1) v1.0

  • Number picker functionality has been implemented

##License: MIT

##Contact: email : matt@milkcan.io

##Other Links: