Travis Heeter
Travis Heeter

Reputation: 14054

UI-Bootstrap Number Input Spinner

What I want:

Input number spinner with great-looking buttons that you can always see

<input class="form-control" type="number" spinner ng-model="$scope.someNumber"/>
<!-- notice the `spinner` directive -->

What I have:

Normal input with ui-bootstrap. Spinner is hidden and tiny.

<input class="form-control" type="number" ng-model="$scope.someNumber"/>

Are there directives for better number spinners?

I've tried searching Google, but I'm not finding anything (spinner is also used to refer to a loading image, so perhaps I'm using the wrong terminology).

Upvotes: 1

Views: 5785

Answers (1)

Leguest
Leguest

Reputation: 2137

I created a directive special for you:

You can customize it as you want

  <number-spin data-ng-model="vm.testNumber"></number-spin>

Here the jsfiddle

P.S. I added directive to npmjs here the link,

also github and demos

Upvotes: 3

Related Questions