UNPKG

@spalger/kibana

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

20 lines (17 loc) 511 B
define(function (require) { var module = require('ui/modules').get('kibana'); module.directive('inputWholeNumber', function () { return { restrict: 'A', require: 'ngModel', link: function ($scope, $elem, attrs, ngModel) { ngModel.$parsers.push(checkWholeNumber); ngModel.$formatters.push(checkWholeNumber); function checkWholeNumber(value) { ngModel.$setValidity('whole', value % 1 === 0); return value; } } }; }); });