July 3, 2014
in one of LogoUi’s projects we had a requirement for a numeric input type.My first thought was using an HTML5 input type number . Example: <input type="number" min="1" max="5"> The problem was that not all browsers has support for HTML5 input types.Check this site for more information about HTML5 forms browser support . so as a solution I decided to do 2 things: A) Use jQuery Spinner (numeric) widget which solves my cross browser compatibility issue.B) Wrap the widget as an Angular directive. Final Result: http://embed.plnkr.co/o33VP56azuA22FLjpU3p/preview You can find my source code and more examples regarding Numeric directive in my GitHub page. Enjoy!