## Members
#config : Config

Holds the current configuration of the service and is populated by the directive instance.

#min : Number

Optional min value.

#max : Number

Optional max value.

#step : Number

Optional step value.

numberInputObject

The number-input is an angular directive which provides number validation, parsing and formatting capabilities.

## Functions
#create()Object

Returns an instance of the service used by a specific directive instance.

#validate([modelValue], [viewValue])Boolean

Optional validation function.
This function is optional and it is not required to implement it.

#parse([value])Object

Optional parser function.
This function is optional and it is not required to implement it.

#format([value])Object

Optional formatter function.
This function is optional and it is not required to implement it.

#link(scope, element, attributes, ngModelCtrl)

Will be called only once when the directive has access to the service.
This function is optional and it is not required to implement it.

## Events
"number-input$update-model" ([modelValue])

Event which will update the model and view value.

## Typedefs
Config : Object

The directive configuration.

## Interfaces
NumberInputService

Service definition used by the number input to extend the number input capabilities.

## NumberInputService Service definition used by the number input to extend the number input capabilities. **Kind**: global interface **Access**: public **Author**: Sagie Gur-Ari * [NumberInputService](#NumberInputService) * [#config](#NumberInputService+config) : [Config](#Config) * [#min](#NumberInputService+min) : Number * [#max](#NumberInputService+max) : Number * [#step](#NumberInputService+step) : Number * [#create()](#NumberInputService+create) ⇒ Object * [#validate([modelValue], [viewValue])](#NumberInputService+validate) ⇒ Boolean * [#parse([value])](#NumberInputService+parse) ⇒ Object * [#format([value])](#NumberInputService+format) ⇒ Object * [#link(scope, element, attributes, ngModelCtrl)](#NumberInputService+link) ### NumberInputService#config : [Config](#Config) Holds the current configuration of the service and is populated by the directive instance. **Kind**: global property of [NumberInputService](#NumberInputService) **Access**: public ### NumberInputService#min : Number Optional min value. **Kind**: global property of [NumberInputService](#NumberInputService) **Access**: public ### NumberInputService#max : Number Optional max value. **Kind**: global property of [NumberInputService](#NumberInputService) **Access**: public ### NumberInputService#step : Number Optional step value. **Kind**: global property of [NumberInputService](#NumberInputService) **Access**: public ### NumberInputService#create() ⇒ Object Returns an instance of the service used by a specific directive instance. **Kind**: global method of [NumberInputService](#NumberInputService) **Returns**: Object - The service instance **Access**: public ### NumberInputService#validate([modelValue], [viewValue]) ⇒ Boolean Optional validation function.
This function is optional and it is not required to implement it. **Kind**: global method of [NumberInputService](#NumberInputService) **Returns**: Boolean - true if valid **Access**: public | Param | Type | Description | | --- | --- | --- | | [modelValue] | Object | The model value | | [viewValue] | Object | The UI view value | ### NumberInputService#parse([value]) ⇒ Object Optional parser function.
This function is optional and it is not required to implement it. **Kind**: global method of [NumberInputService](#NumberInputService) **Returns**: Object - The parsed value **Access**: public | Param | Type | Description | | --- | --- | --- | | [value] | Object | The value to parse | ### NumberInputService#format([value]) ⇒ Object Optional formatter function.
This function is optional and it is not required to implement it. **Kind**: global method of [NumberInputService](#NumberInputService) **Returns**: Object - The formatted value **Access**: public | Param | Type | Description | | --- | --- | --- | | [value] | Object | The value to format | ### NumberInputService#link(scope, element, attributes, ngModelCtrl) Will be called only once when the directive has access to the service.
This function is optional and it is not required to implement it. **Kind**: global method of [NumberInputService](#NumberInputService) **Access**: public | Param | Type | Description | | --- | --- | --- | | scope | Object | The angular scope for the element | | element | Object | The jquery element on which the directive is defined on | | attributes | Object | Provides access to the element attributes | | ngModelCtrl | Object | The angular model controller | ## numberInput ⇒ Object The number-input is an angular directive which provides number validation, parsing and formatting capabilities. **Kind**: global variable **Returns**: Object - The directive definition **Ngdoc**: directive **Restrict**: ECA | Param | Type | Description | | --- | --- | --- | | ng-model | Number | The model for the number input | | [min] | Number | Optional min number value | | [max] | Number | Optional max number value | | [step] | Number | Optional step between numbers | | [validation] | function | Optional external validation function | | [parser] | function | Optional external parser function | | [formatter] | function | Optional external formatter function | | [service] | String | Optional service to inject which will be used to control the directive behaviour (will override validation, parser and formatter attributes) | **Example** ```html ``` ## "number-input$update-model" ([modelValue]) Event which will update the model and view value. **Kind**: event emitted | Param | Type | Description | | --- | --- | --- | | [modelValue] | Object | The new model value (undefined to use the ngModelCtrl.$modelValue instead) | ## Config : Object The directive configuration. **Kind**: global typedef | Param | Type | Description | | --- | --- | --- | | [min] | Number | Optional min number value | | [max] | Number | Optional max number value | | [step] | Number | Optional step between numbers |