UNPKG

kibana-123

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

19 lines (16 loc) 464 B
import uiModules from 'ui/modules'; let module = uiModules.get('kibana'); module.directive('inputNumber', function () { return { restrict: 'A', require: 'ngModel', link: function ($scope, $elem, attrs, ngModel) { ngModel.$parsers.push(checkNumber); ngModel.$formatters.push(checkNumber); function checkNumber(value) { ngModel.$setValidity('number', !isNaN(parseFloat(value))); return value; } } }; });